diff runtime/doc/diff.txt @ 34332:7ccaadd7cf0b v9.1.0099

patch 9.1.0099: Not able to use diff() with 'diffexpr' Commit: https://github.com/vim/vim/commit/a0010a186d93187d2b69b857d75db8a1e01049bb Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Mon Feb 12 20:21:26 2024 +0100 patch 9.1.0099: Not able to use diff() with 'diffexpr' Problem: Not able to use diff() with 'diffexpr' (rickhowe, after v9.1.0096) Solution: Use a default context length of 0, update diff() help text, add a test for using diff() with 'diffexpr' (Yegappan Lakshmanan) closes: #14013 Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Mon, 12 Feb 2024 20:30:06 +0100
parents cce6b834635c
children
line wrap: on
line diff
--- a/runtime/doc/diff.txt
+++ b/runtime/doc/diff.txt
@@ -510,9 +510,14 @@ between two Lists of strings are below.
    [{'from_idx': 1, 'from_count': 2, 'to_idx': 1, 'to_count': 0}]
 
   " disjointed changes
-  :echo diff(['ab', 'def', 'ghi', 'jkl'], ['abc', 'def', 'ghi', 'jk'], {'output': 'indices'})
+  :echo diff(['ab', 'def', 'ghi', 'jkl'], ['abc', 'def', 'ghi', 'jk'], {'output': 'indices', 'context': 0})
    [{'from_idx': 0, 'from_count': 1, 'to_idx': 0, 'to_count': 1},
     {'from_idx': 3, 'from_count': 1, 'to_idx': 3, 'to_count': 1}]
+
+  " disjointed changes with context length 1
+  :echo diff(['ab', 'def', 'ghi', 'jkl'], ['abc', 'def', 'ghi', 'jk'], {'output': 'indices', 'context': 1})
+   [{'from_idx': 0, 'from_count': 4, 'to_idx': 0, 'to_count': 4}]
+
 <
 
  vim:tw=78:ts=8:noet:ft=help:norl: