summaryrefslogtreecommitdiff
path: root/src/syntax.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-06-29 03:42:42 +0200
committerBram Moolenaar <Bram@vim.org>2019-06-29 03:42:42 +0200
commit548be7f126dc57ca861cb26dc6492c3b2a9e2c99 (patch)
tree0cb3d5f33bab047d5612c5b29196db5e3ffe886a /src/syntax.c
parent4340fc95d50518c6eb199107e5f1144f210c7ee5 (diff)
downloadvim-git-548be7f126dc57ca861cb26dc6492c3b2a9e2c99.tar.gz
patch 8.1.1606: on a narrow screen ":hi" output is confusingv8.1.1606
Problem: On a narrow screen ":hi" output is confusing. Solution: Insert a space between highlight group name and "xxx". (Masato Nishihaga, closes #4599)
Diffstat (limited to 'src/syntax.c')
-rw-r--r--src/syntax.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/syntax.c b/src/syntax.c
index 8c23d20a3..4d4234683 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -9440,6 +9440,7 @@ syn_list_header(
{
int endcol = 19;
int newline = TRUE;
+ int name_col = 0;
if (!did_header)
{
@@ -9447,6 +9448,7 @@ syn_list_header(
if (got_int)
return TRUE;
msg_outtrans(HL_TABLE()[id - 1].sg_name);
+ name_col = msg_col;
endcol = 15;
}
else if (msg_col + outlen + 1 >= Columns)
@@ -9471,6 +9473,8 @@ syn_list_header(
/* 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(' ');
}