diff src/diff.c @ 15900:360c93a884d0 v8.1.0956

patch 8.1.0956: using context:0 in 'diffopt' does not work well commit https://github.com/vim/vim/commit/b9ddda6c2d98d99c09d58145c1b5b4042a8fd92c Author: Bram Moolenaar <Bram@vim.org> Date: Tue Feb 19 23:00:50 2019 +0100 patch 8.1.0956: using context:0 in 'diffopt' does not work well Problem: Using context:0 in 'diffopt' does not work well. Solution: Make zero context do the same as one line context. (closes https://github.com/vim/vim/issues/4005)
author Bram Moolenaar <Bram@vim.org>
date Tue, 19 Feb 2019 23:15:05 +0100
parents 734b1928a5aa
children ced614446eaa
line wrap: on
line diff
--- 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;