From 8065fc9aaeff734f38109aec52bf852379a5a183 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 11 Mar 2023 20:12:58 +0800 Subject: fix(edit): don't subtract msg_scrolled when removing double quote (#22630) With msg_grid there is no need to subtract msg_scrolled. --- src/nvim/edit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/nvim/edit.c b/src/nvim/edit.c index 9eb4802d97..6e8dc8fc02 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -1510,14 +1510,14 @@ bool prompt_curpos_editable(void) // Undo the previous edit_putchar(). void edit_unputchar(void) { - if (pc_status != PC_STATUS_UNSET && pc_row >= msg_scrolled) { + if (pc_status != PC_STATUS_UNSET) { if (pc_status == PC_STATUS_RIGHT) { curwin->w_wcol++; } if (pc_status == PC_STATUS_RIGHT || pc_status == PC_STATUS_LEFT) { redrawWinline(curwin, curwin->w_cursor.lnum); } else { - grid_puts(&curwin->w_grid, pc_bytes, pc_row - msg_scrolled, pc_col, pc_attr); + grid_puts(&curwin->w_grid, pc_bytes, pc_row, pc_col, pc_attr); } } } -- cgit