0
0
mirror of https://github.com/vim/vim.git synced 2025-09-06 21:53:38 -04:00

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:
Bram Moolenaar 2022-01-01 12:42:56 +00:00
parent b79ee0c299
commit b37a65e4bf
3 changed files with 15 additions and 0 deletions

View File

@ -3239,6 +3239,9 @@ vgetorpeek(int advance)
if (pending_exmode_active)
exmode_active = EXMODE_NORMAL;
// no chars to block abbreviation for
typebuf.tb_no_abbr_cnt = 0;
break;
}

View File

@ -13,4 +13,14 @@ func Test_feedkeys_x_with_empty_string()
quit!
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

View File

@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
3966,
/**/
3965,
/**/