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>
diff --git a/src/diff.c b/src/diff.c
index a4f3f7e..d2089dc 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -3511,9 +3511,9 @@
}
}
- *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;