summaryrefslogtreecommitdiffstats
path: root/src/diff.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-02-19 23:00:50 +0100
committerBram Moolenaar <Bram@vim.org>2019-02-19 23:00:50 +0100
commitb9ddda6c2d98d99c09d58145c1b5b4042a8fd92c (patch)
treeb9ad408dfdd16ffd01276e8b583ff208133bf153 /src/diff.c
parent66ae3d199fdcd732eb79266e913e4e6d2e82ee76 (diff)
patch 8.1.0956: using context:0 in 'diffopt' does not work wellv8.1.0956
Problem: Using context:0 in 'diffopt' does not work well. Solution: Make zero context do the same as one line context. (closes #4005)
Diffstat (limited to 'src/diff.c')
-rw-r--r--src/diff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/diff.c b/src/diff.c
index 9220c72148..336157c6d9 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -2277,7 +2277,7 @@ diffopt_changed(void)
tp->tp_diff_invalid = TRUE;
diff_flags = diff_flags_new;
- diff_context = diff_context_new;
+ diff_context = diff_context_new == 0 ? 1 : diff_context_new;
diff_foldcolumn = diff_foldcolumn_new;
diff_algorithm = diff_algorithm_new;