aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-04-10 08:50:36 +0800
committerGitHub <noreply@github.com>2024-04-10 08:50:36 +0800
commit49983387ffd54fe0888f17098e43318a443315ac (patch)
treede1c226b136bb1258e589eaa920c08ee79dcd8f7 /src/nvim/eval.c
parentf49408454ddb48016d51b48bcd9d5dab538f5cc7 (diff)
downloadrneovim-49983387ffd54fe0888f17098e43318a443315ac.tar.gz
rneovim-49983387ffd54fe0888f17098e43318a443315ac.tar.bz2
rneovim-49983387ffd54fe0888f17098e43318a443315ac.zip
fix(prompt): emit change event for prompt newline (#28260)
Co-authored-by: Ilia Choly <ilia.choly@gmail.com>
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r--src/nvim/eval.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index 198d7b3bc8..9551a688c3 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -17,6 +17,7 @@
#include "nvim/autocmd.h"
#include "nvim/buffer.h"
#include "nvim/buffer_defs.h"
+#include "nvim/change.h"
#include "nvim/channel.h"
#include "nvim/charset.h"
#include "nvim/cmdexpand_defs.h"
@@ -8905,6 +8906,7 @@ void invoke_prompt_callback(void)
// Add a new line for the prompt before invoking the callback, so that
// text can always be inserted above the last line.
ml_append(lnum, "", 0, false);
+ appended_lines_mark(lnum, 1);
curwin->w_cursor.lnum = lnum + 1;
curwin->w_cursor.col = 0;