aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTomasz N <przepompownia@users.noreply.github.com>2024-12-10 11:39:41 +0100
committerGitHub <noreply@github.com>2024-12-10 02:39:41 -0800
commitca760e645ba4d1fdb0b6fff3ac98231c3d683306 (patch)
tree8d0f0a5def427ac96c6ffbb3c4cf020aefe6aff0 /src
parentc87ca1e2eba8659841fd5f4dfdb601eab705485c (diff)
downloadrneovim-ca760e645ba4d1fdb0b6fff3ac98231c3d683306.tar.gz
rneovim-ca760e645ba4d1fdb0b6fff3ac98231c3d683306.tar.bz2
rneovim-ca760e645ba4d1fdb0b6fff3ac98231c3d683306.zip
fix(messages): no message kind for :write messages #31519
- Problem: cannot replace the initial bufwrite message (from `filemess`) by the final one (`"test.lua" [New] 0L, 0B written`), when using `vim.ui_attach`. - Solution: add kind to both messages.
Diffstat (limited to 'src')
-rw-r--r--src/nvim/bufwrite.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/bufwrite.c b/src/nvim/bufwrite.c
index 95639bed70..2cf02403da 100644
--- a/src/nvim/bufwrite.c
+++ b/src/nvim/bufwrite.c
@@ -1148,6 +1148,7 @@ int buf_write(buf_T *buf, char *fname, char *sfname, linenr_T start, linenr_T en
msg_scroll = true; // don't overwrite previous file message
}
if (!filtering) {
+ msg_ext_set_kind("bufwrite");
// show that we are busy
#ifndef UNIX
filemess(buf, sfname, "");
@@ -1763,6 +1764,7 @@ restore_backup:
if (msg_add_fileformat(fileformat)) {
insert_space = true;
}
+ msg_ext_set_kind("bufwrite");
msg_add_lines(insert_space, lnum, nchars); // add line/char count
if (!shortmess(SHM_WRITE)) {
if (append) {