diff options
author | bfredl <bjorn.linse@gmail.com> | 2024-11-11 12:26:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-11 12:26:35 +0100 |
commit | d0e78b587195d201d643f3e131dd1ea951d906db (patch) | |
tree | 2a08bef2c02751daf28a33be8c57049554b57726 /src/nvim/bufwrite.c | |
parent | 7919aa9102e1b9b7a9f7feaea6b134a98f5b60fc (diff) | |
parent | 4f9260d06a48216862ebb34fc33744486b058f58 (diff) | |
download | rneovim-d0e78b587195d201d643f3e131dd1ea951d906db.tar.gz rneovim-d0e78b587195d201d643f3e131dd1ea951d906db.tar.bz2 rneovim-d0e78b587195d201d643f3e131dd1ea951d906db.zip |
Merge pull request #27813 from luukvbaal/msgid
feat(ext_messages): add hl_id to ext_messages chunks
Diffstat (limited to 'src/nvim/bufwrite.c')
-rw-r--r-- | src/nvim/bufwrite.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/nvim/bufwrite.c b/src/nvim/bufwrite.c index fa0a55e7b6..2752ef5c59 100644 --- a/src/nvim/bufwrite.c +++ b/src/nvim/bufwrite.c @@ -350,7 +350,7 @@ static int check_mtime(buf_T *buf, FileInfo *file_info) msg_scroll = true; // Don't overwrite messages here. msg_silent = 0; // Must give this prompt. // Don't use emsg() here, don't want to flush the buffers. - msg(_("WARNING: The file has been changed since reading it!!!"), HL_ATTR(HLF_E)); + msg(_("WARNING: The file has been changed since reading it!!!"), HLF_E + 1); if (ask_yesno(_("Do you really want to write to it"), true) == 'n') { return FAIL; } @@ -1150,9 +1150,9 @@ int buf_write(buf_T *buf, char *fname, char *sfname, linenr_T start, linenr_T en if (!filtering) { // show that we are busy #ifndef UNIX - filemess(buf, sfname, "", 0); + filemess(buf, sfname, ""); #else - filemess(buf, fname, "", 0); + filemess(buf, fname, ""); #endif } msg_scroll = false; // always overwrite the file message now @@ -1881,11 +1881,9 @@ nofail: retval = FAIL; if (end == 0) { - const int attr = HL_ATTR(HLF_E); // Set highlight for error messages. - msg_puts_attr(_("\nWARNING: Original file may be lost or damaged\n"), - attr | MSG_HIST); - msg_puts_attr(_("don't quit the editor until the file is successfully written!"), - attr | MSG_HIST); + const int hl_id = HLF_E + 1; // Set highlight for error messages. + msg_puts_hl(_("\nWARNING: Original file may be lost or damaged\n"), hl_id, true); + msg_puts_hl(_("don't quit the editor until the file is successfully written!"), hl_id, true); // Update the timestamp to avoid an "overwrite changed file" // prompt when writing again. |