fix(ui): command line issues with external messages (#21709)

* fix: don't truncate external messages
* fix: avoid resizing command line with external messages
This commit is contained in:
luukvbaal
2023-01-13 04:47:55 +01:00
committed by GitHub
parent 4876654d4c
commit 1097d239c3
4 changed files with 27 additions and 10 deletions

View File

@@ -919,9 +919,11 @@ char *msg_trunc_attr(char *s, bool force, int attr)
/// @note: May change the message by replacing a character with '<'.
char *msg_may_trunc(bool force, char *s)
{
int room;
if (ui_has(kUIMessages)) {
return s;
}
room = (Rows - cmdline_row - 1) * Columns + sc_col - 1;
int room = (Rows - cmdline_row - 1) * Columns + sc_col - 1;
if ((force || (shortmess(SHM_TRUNC) && !exmode_active))
&& (int)strlen(s) - room > 0) {
int size = vim_strsize(s);