forked from aniani/vim
patch 8.2.3966: when using feedkeys() abbreviations may be blocked
Problem: When using feedkeys() abbreviations may be blocked. Solution: Reset tb_no_abbr_cnt when running out of characters. (closes #9448)
This commit is contained in:
@@ -3239,6 +3239,9 @@ vgetorpeek(int advance)
|
|||||||
if (pending_exmode_active)
|
if (pending_exmode_active)
|
||||||
exmode_active = EXMODE_NORMAL;
|
exmode_active = EXMODE_NORMAL;
|
||||||
|
|
||||||
|
// no chars to block abbreviation for
|
||||||
|
typebuf.tb_no_abbr_cnt = 0;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -13,4 +13,14 @@ func Test_feedkeys_x_with_empty_string()
|
|||||||
quit!
|
quit!
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_feedkeys_with_abbreviation()
|
||||||
|
new
|
||||||
|
inoreabbrev trigger value
|
||||||
|
call feedkeys("atrigger ", 'x')
|
||||||
|
call feedkeys("atrigger ", 'x')
|
||||||
|
call assert_equal('value value ', getline(1))
|
||||||
|
bwipe!
|
||||||
|
iunabbrev trigger
|
||||||
|
endfunc
|
||||||
|
|
||||||
" vim: shiftwidth=2 sts=2 expandtab
|
" vim: shiftwidth=2 sts=2 expandtab
|
||||||
|
@@ -749,6 +749,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
3966,
|
||||||
/**/
|
/**/
|
||||||
3965,
|
3965,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user