diff options
author | Volodymyr Kot <volodymyr.kot.ua@gmail.com> | 2021-11-21 18:10:24 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-21 13:10:24 -0500 |
commit | 9d0726f6d85e5101dd44b174ab40d0f2f4e4ff44 (patch) | |
tree | ca94508197d7d598fdb4412ab319c28dea9ac34e /src/nvim/syntax.c | |
parent | 9d868317f9c6b9cf5ec4bcf0694d2934815d806d (diff) | |
download | rneovim-9d0726f6d85e5101dd44b174ab40d0f2f4e4ff44.tar.gz rneovim-9d0726f6d85e5101dd44b174ab40d0f2f4e4ff44.tar.bz2 rneovim-9d0726f6d85e5101dd44b174ab40d0f2f4e4ff44.zip |
vim-patch:8.1.1606: on a narrow screen ":hi" output is confusing (#16388)
Problem: On a narrow screen ":hi" output is confusing.
Solution: Insert a space between highlight group name and "xxx". (Masato
Nishihaga, closes vim/vim#4599)
https://github.com/vim/vim/commit/548be7f126dc57ca861cb26dc6492c3b2a9e2c99
Diffstat (limited to 'src/nvim/syntax.c')
-rw-r--r-- | src/nvim/syntax.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c index 13833c256e..dd3f1b4dc9 100644 --- a/src/nvim/syntax.c +++ b/src/nvim/syntax.c @@ -7536,6 +7536,7 @@ static bool syn_list_header(const bool did_header, const int outlen, const int i { int endcol = 19; bool newline = true; + int name_col = 0; bool adjust = true; if (!did_header) { @@ -7544,6 +7545,7 @@ static bool syn_list_header(const bool did_header, const int outlen, const int i return true; } msg_outtrans(HL_TABLE()[id - 1].sg_name); + name_col = msg_col; endcol = 15; } else if ((ui_has(kUIMessages) || msg_silent) && !force_newline) { msg_putchar(' '); @@ -7570,6 +7572,9 @@ static bool syn_list_header(const bool did_header, const int outlen, const int i // Show "xxx" with the attributes. if (!did_header) { + if (endcol == Columns - 1 && endcol <= name_col) { + msg_putchar(' '); + } msg_puts_attr("xxx", syn_id2attr(id)); msg_putchar(' '); } |