diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-04-20 16:39:19 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-04-20 16:39:19 +0200 |
commit | 8e42ae5069d4985869e46eaa56900ed19e30f504 (patch) | |
tree | 4c8f19c9a79950c35923c844ff2a5a952e7151e8 /src | |
parent | a6e42501424f6670fa864c739d2dc2eb764900b9 (diff) | |
download | vim-8e42ae5069d4985869e46eaa56900ed19e30f504.zip |
patch 7.4.1757
Problem: When using complete() it may set 'modified' even though nothing
was inserted.
Solution: Use Down/Up instead of Next/Previous match. (Shougo, closes #745)
Diffstat (limited to 'src')
-rw-r--r-- | src/edit.c | 12 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 9 insertions, 5 deletions
diff --git a/src/edit.c b/src/edit.c index 080e1ab31..c813d1f89 100644 --- a/src/edit.c +++ b/src/edit.c @@ -2813,12 +2813,15 @@ set_completion(colnr_T startcol, list_T *list) compl_cont_status = 0; compl_curr_match = compl_first_match; - if (compl_no_insert) + if (compl_no_insert || compl_no_select) + { ins_complete(K_DOWN, FALSE); + if (compl_no_select) + /* Down/Up has no real effect. */ + ins_complete(K_UP, FALSE); + } else ins_complete(Ctrl_N, FALSE); - if (compl_no_select) - ins_complete(Ctrl_P, FALSE); /* Lazily show the popup menu, unless we got interrupted. */ if (!compl_interrupted) @@ -4969,8 +4972,7 @@ ins_compl_check_keys(int frequency) ins_compl_key2dir(int c) { if (c == Ctrl_P || c == Ctrl_L - || (pum_visible() && (c == K_PAGEUP || c == K_KPAGEUP - || c == K_S_UP || c == K_UP))) + || c == K_PAGEUP || c == K_KPAGEUP || c == K_S_UP || c == K_UP) return BACKWARD; return FORWARD; } diff --git a/src/version.c b/src/version.c index 6fdc9da49..6308789d6 100644 --- a/src/version.c +++ b/src/version.c @@ -749,6 +749,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1757, +/**/ 1756, /**/ 1755, |