diff options
author | Anatolii Sakhnik <sakhnik@gmail.com> | 2018-12-09 20:24:38 +0200 |
---|---|---|
committer | Anatolii Sakhnik <sakhnik@gmail.com> | 2018-12-09 22:19:41 +0200 |
commit | 4e2981081796c8618caa4bed30d12e1e8fc8ae08 (patch) | |
tree | 5ee3708332f5ad0cb09a309c1f031c7767948dd3 /src | |
parent | f273e43cb83c1617969ebd4eaa51aa5bc3f0b855 (diff) | |
download | rneovim-4e2981081796c8618caa4bed30d12e1e8fc8ae08.tar.gz rneovim-4e2981081796c8618caa4bed30d12e1e8fc8ae08.tar.bz2 rneovim-4e2981081796c8618caa4bed30d12e1e8fc8ae08.zip |
vim-patch:8.1.0562: parsing of 'diffopt' is slightly wrong
Problem: Parsing of 'diffopt' is slightly wrong.
Solution: Fix the parsing and add a test. (Jason Franklin, Christian
Brabandt)
https://github.com/vim/vim/commit/b6fc72851c45a36a370f9516c68508e47b41c4c1
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/diff.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nvim/diff.c b/src/nvim/diff.c index 19751cb73a..2e0b198c13 100644 --- a/src/nvim/diff.c +++ b/src/nvim/diff.c @@ -2109,6 +2109,7 @@ int diffopt_changed(void) int diff_flags_new = 0; int diff_foldcolumn_new = 2; long diff_algorithm_new = 0; + long diff_indent_heuristic = 0; char_u *p = p_dip; while (*p != NUL) { @@ -2147,7 +2148,7 @@ int diffopt_changed(void) diff_flags_new |= DIFF_HIDDEN_OFF; } 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) { p += 8; diff_flags_new |= DIFF_INTERNAL; @@ -2179,6 +2180,8 @@ int diffopt_changed(void) } } + 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; |