aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-03-11 20:12:58 +0800
committerGitHub <noreply@github.com>2023-03-11 20:12:58 +0800
commit8065fc9aaeff734f38109aec52bf852379a5a183 (patch)
treec8c98e46cb261ce7d065d197c32676ff69ea2296 /src
parentf3efcd0348d34e4ebb44bde3be310379fb84a5a9 (diff)
downloadrneovim-8065fc9aaeff734f38109aec52bf852379a5a183.tar.gz
rneovim-8065fc9aaeff734f38109aec52bf852379a5a183.tar.bz2
rneovim-8065fc9aaeff734f38109aec52bf852379a5a183.zip
fix(edit): don't subtract msg_scrolled when removing double quote (#22630)
With msg_grid there is no need to subtract msg_scrolled.
Diffstat (limited to 'src')
-rw-r--r--src/nvim/edit.c4
1 files changed, 2 insertions, 2 deletions
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);
}
}
}