From f91cd31d7d9d70006e0000592637d5d997eab52c Mon Sep 17 00:00:00 2001 From: bfredl Date: Wed, 27 Sep 2023 21:46:39 +0200 Subject: refactor(messages): fold msg_outtrans_attr into msg_outtrans problem: there are too many different functions in message.c solution: fold some of the functions into themselves --- src/nvim/fileio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/fileio.c') diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index 7ff3e0ec6e..8a5473acdb 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -118,7 +118,7 @@ void filemess(buf_T *buf, char *name, char *s, int attr) msg_scroll = msg_scroll_save; msg_scrolled_ign = true; // may truncate the message to avoid a hit-return prompt - msg_outtrans_attr(msg_may_trunc(false, IObuff), attr); + msg_outtrans(msg_may_trunc(false, IObuff), attr); msg_clr_eos(); ui_flush(); msg_scrolled_ign = false; -- cgit From b85f1dafc7c0a19704135617454f1c66f41202c1 Mon Sep 17 00:00:00 2001 From: bfredl Date: Wed, 27 Sep 2023 22:21:17 +0200 Subject: refactor(messages): fold msg_attr into msg problem: there are too many different functions in message.c solution: fold some of the functions into themselves --- src/nvim/fileio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/fileio.c') diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index 8a5473acdb..dfa61e7cf7 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -2035,7 +2035,7 @@ static char *readfile_charconvert(char *fname, char *fenc, int *fdp) if (errmsg != NULL) { // Don't use emsg(), it breaks mappings, the retry with // another type of conversion might still work. - msg(errmsg); + msg(errmsg, 0); if (tmpname != NULL) { os_remove(tmpname); // delete converted file XFREE_CLEAR(tmpname); -- cgit From 448d4837be7f7bd60ac0b5a3100c0217ac48a495 Mon Sep 17 00:00:00 2001 From: bfredl Date: Wed, 27 Sep 2023 22:24:50 +0200 Subject: refactor(messages): rename msg_trunc_attr and msg_multiline_attr without attr --- src/nvim/fileio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/fileio.c') diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index dfa61e7cf7..7c1d495505 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -1762,7 +1762,7 @@ failed: if (msg_col > 0) { msg_putchar('\r'); // overwrite previous message } - p = (uint8_t *)msg_trunc_attr(IObuff, false, 0); + p = (uint8_t *)msg_trunc(IObuff, false, 0); } if (read_stdin || read_buffer || restart_edit != 0 -- cgit