diff src/diff.c @ 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 6d9f59e88fc2
children 9e093c96dff6
line wrap: on
line diff
--- a/src/diff.c
+++ b/src/diff.c
@@ -3511,9 +3511,9 @@ parse_diff_optarg(
 	}
     }
 
-    *diff_ctxlen = dict_get_number_def(d, "context", 1);
+    *diff_ctxlen = dict_get_number_def(d, "context", 0);
     if (*diff_ctxlen < 0)
-	*diff_ctxlen = 1;
+	*diff_ctxlen = 0;
 
     if (dict_get_bool(d, "iblank", FALSE))
 	*diffopts |= DIFF_IBLANK;