Patch 8.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)
Files:      src/syntax.c, src/testdir/test_highlight.vim


*** ../vim-8.1.1605/src/syntax.c        2019-06-26 00:34:10.456712240 +0200
--- src/syntax.c        2019-06-29 03:39:34.705571437 +0200
***************
*** 9440,9445 ****
--- 9440,9446 ----
  {
      int           endcol = 19;
      int           newline = TRUE;
+     int           name_col = 0;
  
      if (!did_header)
      {
***************
*** 9447,9452 ****
--- 9448,9454 ----
        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,9476 ****
--- 9473,9480 ----
      /* 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(' ');
      }
*** ../vim-8.1.1605/src/testdir/test_highlight.vim      2019-06-24 
00:58:02.908020514 +0200
--- src/testdir/test_highlight.vim      2019-06-29 03:39:34.705571437 +0200
***************
*** 607,609 ****
--- 607,617 ----
      call assert_match('hi Normal\s*clear', hlNormal)
    endif
  endfunc
+ 
+ function Test_no_space_before_xxx()
+   let l:org_columns = &columns
+   set columns=17
+   let l:hi_StatusLineTermNC = join(split(execute('hi StatusLineTermNC')))
+   call assert_match('StatusLineTermNC xxx', l:hi_StatusLineTermNC)
+   let &columns = l:org_columns
+ endfunction
*** ../vim-8.1.1605/src/version.c       2019-06-28 22:06:41.110072146 +0200
--- src/version.c       2019-06-29 03:42:07.476865358 +0200
***************
*** 779,780 ****
--- 779,782 ----
  {   /* Add new patch number below this line */
+ /**/
+     1606,
  /**/

-- 
Facepalm statement #5: "Petrol getting more expensive?  Not for me, I'm always
tanking for 20 dollars"

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/201906290143.x5T1hs6P024466%40masaka.moolenaar.net.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui