Skip to content

Commit 8e42ae5

Browse files
committed
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)
1 parent a6e4250 commit 8e42ae5

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

src/edit.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2813,12 +2813,15 @@ set_completion(colnr_T startcol, list_T *list)
28132813
compl_cont_status = 0;
28142814

28152815
compl_curr_match = compl_first_match;
2816-
if (compl_no_insert)
2816+
if (compl_no_insert || compl_no_select)
2817+
{
28172818
ins_complete(K_DOWN, FALSE);
2819+
if (compl_no_select)
2820+
/* Down/Up has no real effect. */
2821+
ins_complete(K_UP, FALSE);
2822+
}
28182823
else
28192824
ins_complete(Ctrl_N, FALSE);
2820-
if (compl_no_select)
2821-
ins_complete(Ctrl_P, FALSE);
28222825

28232826
/* Lazily show the popup menu, unless we got interrupted. */
28242827
if (!compl_interrupted)
@@ -4969,8 +4972,7 @@ ins_compl_check_keys(int frequency)
49694972
ins_compl_key2dir(int c)
49704973
{
49714974
if (c == Ctrl_P || c == Ctrl_L
4972-
|| (pum_visible() && (c == K_PAGEUP || c == K_KPAGEUP
4973-
|| c == K_S_UP || c == K_UP)))
4975+
|| c == K_PAGEUP || c == K_KPAGEUP || c == K_S_UP || c == K_UP)
49744976
return BACKWARD;
49754977
return FORWARD;
49764978
}

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,8 @@ static char *(features[]) =
748748

749749
static int included_patches[] =
750750
{ /* Add new patch number below this line */
751+
/**/
752+
1757,
751753
/**/
752754
1756,
753755
/**/

0 commit comments

Comments
 (0)