mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -04:00
patch 8.2.4705: jump list marker disappears
Problem: Jump list marker disappears. Solution: Reset reg_executing later. (closes #10111, closes #10100)
This commit is contained in:
@@ -1421,7 +1421,7 @@ static int old_mouse_row; // mouse_row related to old_char
|
||||
static int old_mouse_col; // mouse_col related to old_char
|
||||
static int old_KeyStuffed; // whether old_char was stuffed
|
||||
|
||||
static int can_get_old_char()
|
||||
static int can_get_old_char(void)
|
||||
{
|
||||
// If the old character was not stuffed and characters have been added to
|
||||
// the stuff buffer, need to first get the stuffed characters instead.
|
||||
@@ -2950,7 +2950,7 @@ handle_mapping(
|
||||
|
||||
/*
|
||||
* unget one character (can only be done once!)
|
||||
* If the character was stuffed, vgetc() will get it next time it was called.
|
||||
* If the character was stuffed, vgetc() will get it next time it is called.
|
||||
* Otherwise vgetc() will only get it when the stuff buffer is empty.
|
||||
*/
|
||||
void
|
||||
@@ -2963,6 +2963,27 @@ vungetc(int c)
|
||||
old_KeyStuffed = KeyStuffed;
|
||||
}
|
||||
|
||||
/*
|
||||
* When peeking and not getting a character, reg_executing cannot be cleared
|
||||
* yet, so set a flag to clear it later.
|
||||
*/
|
||||
static void
|
||||
check_end_reg_executing(int advance)
|
||||
{
|
||||
if (reg_executing != 0 && (typebuf.tb_maplen == 0
|
||||
|| pending_end_reg_executing))
|
||||
{
|
||||
if (advance)
|
||||
{
|
||||
reg_executing = 0;
|
||||
pending_end_reg_executing = FALSE;
|
||||
}
|
||||
else
|
||||
pending_end_reg_executing = TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Get a byte:
|
||||
* 1. from the stuffbuffer
|
||||
@@ -3026,8 +3047,7 @@ vgetorpeek(int advance)
|
||||
|
||||
init_typebuf();
|
||||
start_stuff();
|
||||
if (advance && typebuf.tb_maplen == 0)
|
||||
reg_executing = 0;
|
||||
check_end_reg_executing(advance);
|
||||
do
|
||||
{
|
||||
/*
|
||||
@@ -3068,6 +3088,7 @@ vgetorpeek(int advance)
|
||||
#ifdef FEAT_CMDL_INFO
|
||||
int showcmd_idx;
|
||||
#endif
|
||||
check_end_reg_executing(advance);
|
||||
/*
|
||||
* ui_breakcheck() is slow, don't use it too often when
|
||||
* inside a mapping. But call it each time for typed
|
||||
|
Reference in New Issue
Block a user