Patch 8.2.2508
Problem:    Cannot change the character displayed in non existing lines.
Solution:   Add the "eob" item to 'fillchars'. (closes #7832, closes #3820)
Files:      runtime/doc/options.txt, runtime/doc/todo.txt,
            runtime/doc/windows.txt, src/drawscreen.c, src/globals.h,
            src/optiondefs.h, src/screen.c, src/testdir/test_display.vim


*** ../vim-8.2.2507/runtime/doc/options.txt     2021-02-10 13:18:14.071747031 
+0100
--- runtime/doc/options.txt     2021-02-13 18:21:20.578514421 +0100
***************
*** 3231,3237 ****
        Only normal file name characters can be used, "/\*?[|<>" are illegal.
  
                                                *'fillchars'* *'fcs'*
! 'fillchars' 'fcs'     string  (default "vert:|,fold:-")
                        global
                        {not available when compiled without the |+folding|
                        feature}
--- 3235,3241 ----
        Only normal file name characters can be used, "/\*?[|<>" are illegal.
  
                                                *'fillchars'* *'fcs'*
! 'fillchars' 'fcs'     string  (default "vert:|,fold:-,eob:~")
                        global
                        {not available when compiled without the |+folding|
                        feature}
***************
*** 3244,3249 ****
--- 3248,3254 ----
          vert:c        '|'             vertical separators |:vsplit|
          fold:c        '-'             filling 'foldtext'
          diff:c        '-'             deleted lines of the 'diff' option
+         eob:c         '~'             empty lines below the end of a buffer
  
        Any one that is omitted will fall back to the default.  For "stl" and
        "stlnc" the space will be used when there is highlighting, '^' or '='
***************
*** 3263,3268 ****
--- 3268,3274 ----
          vert:c        VertSplit               |hl-VertSplit|
          fold:c        Folded                  |hl-Folded|
          diff:c        DiffDelete              |hl-DiffDelete|
+         eob:c         EndOfBuffer             |hl-EndOfBuffer|
  
                *'fixendofline'* *'fixeol'* *'nofixendofline'* *'nofixeol'*
  'fixendofline' 'fixeol'       boolean (default on)
*** ../vim-8.2.2507/runtime/doc/todo.txt        2021-01-31 17:02:06.262490144 
+0100
--- runtime/doc/todo.txt        2021-02-13 18:16:55.439089626 +0100
***************
*** 774,781 ****
  highlight name.  Esp. for the statusline.
  And "extends" and "precedes" are also useful without 'list' set.  Also in
  'fillchars' or another option?
- Related: #3820 - Support setting the character displayed below the last line?
- Neovim uses "eob:X" in 'fillchars'.
  
  Sourceforge Vim pages still have content, redirect from empty page.
  Check for PHP errors. (Wayne Davison, 2018 Oct 26)
--- 776,781 ----
*** ../vim-8.2.2507/runtime/doc/windows.txt     2021-01-31 17:02:06.282490066 
+0100
--- runtime/doc/windows.txt     2021-02-13 18:16:55.439089626 +0100
***************
*** 138,147 ****
  that have termcap codes for italics.
  
                                                        *filler-lines*
! The lines after the last buffer line in a window are called filler lines.
! These lines start with a tilde (~) character. By default, these are
! highlighted as NonText (|hl-NonText|). The EndOfBuffer highlight group
! (|hl-EndOfBuffer|) can be used to change the highlighting of filler lines.
  
  ==============================================================================
  3. Opening and closing a window                               
*opening-window* *E36*
--- 138,149 ----
  that have termcap codes for italics.
  
                                                        *filler-lines*
! The lines after the last buffer line in a window are called filler lines.  By
! default, these lines start with a tilde (~) character. The 'eob' item in the
! 'fillchars' option can be used to change this character. By default, these
! characters are highlighted as NonText (|hl-NonText|). The EndOfBuffer
! highlight group (|hl-EndOfBuffer|) can be used to change the highlighting of
! the filler characters.
  
  ==============================================================================
  3. Opening and closing a window                               
*opening-window* *E36*
*** ../vim-8.2.2507/src/drawscreen.c    2020-08-19 20:19:27.133486043 +0200
--- src/drawscreen.c    2021-02-13 18:16:55.439089626 +0100
***************
*** 2552,2562 ****
            wp->w_botline = lnum;
  
        // Make sure the rest of the screen is blank
!       // put '~'s on rows that aren't part of the file.
        if (WIN_IS_POPUP(wp))
            win_draw_end(wp, ' ', ' ', FALSE, row, wp->w_height, HLF_AT);
        else
!           win_draw_end(wp, '~', ' ', FALSE, row, wp->w_height, HLF_EOB);
      }
  
  #ifdef SYN_TIME_LIMIT
--- 2552,2562 ----
            wp->w_botline = lnum;
  
        // Make sure the rest of the screen is blank
!       // write the 'fill_eob' character to rows that aren't part of the file
        if (WIN_IS_POPUP(wp))
            win_draw_end(wp, ' ', ' ', FALSE, row, wp->w_height, HLF_AT);
        else
!           win_draw_end(wp, fill_eob, ' ', FALSE, row, wp->w_height, HLF_EOB);
      }
  
  #ifdef SYN_TIME_LIMIT
*** ../vim-8.2.2507/src/globals.h       2021-02-03 15:58:09.084690899 +0100
--- src/globals.h       2021-02-13 18:16:55.439089626 +0100
***************
*** 1363,1368 ****
--- 1363,1369 ----
  EXTERN int    fill_vert INIT(= ' ');
  EXTERN int    fill_fold INIT(= '-');
  EXTERN int    fill_diff INIT(= '-');
+ EXTERN int    fill_eob INIT(= '~');
  
  #ifdef FEAT_FOLDING
  EXTERN int    disable_fold_update INIT(= 0);
*** ../vim-8.2.2507/src/optiondefs.h    2021-02-02 21:09:57.966971269 +0100
--- src/optiondefs.h    2021-02-13 18:16:55.439089626 +0100
***************
*** 952,958 ****
                            SCTX_INIT},
      {"fillchars",   "fcs",  P_STRING|P_VI_DEF|P_RALL|P_ONECOMMA|P_NODUP,
                            (char_u *)&p_fcs, PV_NONE,
!                           {(char_u *)"vert:|,fold:-", (char_u *)0L}
                            SCTX_INIT},
      {"fixendofline",  "fixeol", P_BOOL|P_VI_DEF|P_RSTAT,
                            (char_u *)&p_fixeol, PV_FIXEOL,
--- 952,958 ----
                            SCTX_INIT},
      {"fillchars",   "fcs",  P_STRING|P_VI_DEF|P_RALL|P_ONECOMMA|P_NODUP,
                            (char_u *)&p_fcs, PV_NONE,
!                           {(char_u *)"vert:|,fold:-,eob:~", (char_u *)0L}
                            SCTX_INIT},
      {"fixendofline",  "fixeol", P_BOOL|P_VI_DEF|P_RSTAT,
                            (char_u *)&p_fixeol, PV_FIXEOL,
*** ../vim-8.2.2507/src/screen.c        2021-02-03 15:58:09.088690884 +0100
--- src/screen.c        2021-02-13 18:16:55.439089626 +0100
***************
*** 4765,4770 ****
--- 4765,4771 ----
        {&fill_vert,    "vert"},
        {&fill_fold,    "fold"},
        {&fill_diff,    "diff"},
+       {&fill_eob,     "eob"},
      };
      static struct charstab lcstab[] =
      {
***************
*** 4812,4818 ****
--- 4813,4822 ----
                lcs_tab3 = NUL;
            }
            else
+           {
                fill_diff = '-';
+               fill_eob = '~';
+           }
        }
        p = *varp;
        while (*p)
*** ../vim-8.2.2507/src/testdir/test_display.vim        2020-08-20 
18:59:02.106779176 +0200
--- src/testdir/test_display.vim        2021-02-13 18:16:55.439089626 +0100
***************
*** 257,260 ****
--- 257,282 ----
    call StopVimInTerminal(buf)
  endfunc
  
+ " Test for 'eob' (EndOfBuffer) item in 'fillchars'
+ func Test_eob_fillchars()
+   " default value
+   call assert_match('eob:\~', &fillchars)
+   " invalid values
+   call assert_fails(':set fillchars=eob:', 'E474:')
+   call assert_fails(':set fillchars=eob:xy', 'E474:')
+   call assert_fails(':set fillchars=eob:\255', 'E474:')
+   call assert_fails(':set fillchars=eob:<ff>', 'E474:')
+   " default is ~
+   new
+   call assert_equal('~', Screenline(2))
+   set fillchars=eob:+
+   redraw!
+   call assert_equal('+', Screenline(2))
+   set fillchars=eob:\ 
+   redraw!
+   call assert_equal(' ', nr2char(screenchar(2, 1)))
+   set fillchars&
+   close
+ endfunc
+ 
  " vim: shiftwidth=2 sts=2 expandtab
*** ../vim-8.2.2507/src/version.c       2021-02-13 17:08:29.903796267 +0100
--- src/version.c       2021-02-13 18:22:54.610307005 +0100
***************
*** 752,753 ****
--- 752,755 ----
  {   /* Add new patch number below this line */
+ /**/
+     2508,
  /**/

-- 
ARTHUR:  You fight with the strength of many men, Sir knight.
         I am Arthur, King of the Britons.  [pause]
         I seek the finest and the bravest knights in the land to join me
         in my Court of Camelot.  [pause]
         You have proved yourself worthy; will you join me?  [pause]
         You make me sad.  So be it.  Come, Patsy.
BLACK KNIGHT:  None shall pass.
                                  The Quest for the Holy Grail (Monty Python)

 /// 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/202102131724.11DHOxui1173747%40masaka.moolenaar.net.

Raspunde prin e-mail lui