summaryrefslogtreecommitdiff
path: root/src/diff.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-12-04 22:24:16 +0100
committerBram Moolenaar <Bram@vim.org>2018-12-04 22:24:16 +0100
commitb6fc72851c45a36a370f9516c68508e47b41c4c1 (patch)
tree7da05b1356fc904ee84d4a41f894d84b9fa1689e /src/diff.c
parent97195685334c800c5ad1328d957d1bf21f5fa1fa (diff)
downloadvim-git-b6fc72851c45a36a370f9516c68508e47b41c4c1.tar.gz
patch 8.1.0562: parsing of 'diffopt' is slightly wrongv8.1.0562
Problem: Parsing of 'diffopt' is slightly wrong. Solution: Fix the parsing and add a test. (Jason Franklin, Christian Brabandt)
Diffstat (limited to 'src/diff.c')
-rw-r--r--src/diff.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/diff.c b/src/diff.c
index 0399e7967..7f7e15df6 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -2173,6 +2173,7 @@ diffopt_changed(void)
int diff_flags_new = 0;
int diff_foldcolumn_new = 2;
long diff_algorithm_new = 0;
+ long diff_indent_heuristic = 0;
tabpage_T *tp;
p = p_dip;
@@ -2236,7 +2237,7 @@ diffopt_changed(void)
else if (STRNCMP(p, "indent-heuristic", 16) == 0)
{
p += 16;
- diff_algorithm_new |= XDF_INDENT_HEURISTIC;
+ diff_indent_heuristic = XDF_INDENT_HEURISTIC;
}
else if (STRNCMP(p, "internal", 8) == 0)
{
@@ -2276,6 +2277,8 @@ diffopt_changed(void)
++p;
}
+ diff_algorithm_new |= diff_indent_heuristic;
+
/* Can't have both "horizontal" and "vertical". */
if ((diff_flags_new & DIFF_HORIZONTAL) && (diff_flags_new & DIFF_VERTICAL))
return FAIL;