Found out this is in fact an item from todo.txt (has been since 2013). Please see the attached patch.
It's my first patch, comments are very welcome. -- -- 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]. For more options, visit https://groups.google.com/d/optout.
commit 78127c494dbc3364395ea45b4d1f3cfc8a1e10be Author: Bart Louwers <[email protected]> Date: Thu Oct 12 18:22:43 2017 +0200 Add FoldedLineNr highlighting group diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index ebe9c9262..c4ba8c880 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -4048,8 +4048,8 @@ A jump table for the options with a short description can be found at |Q_op|. "8:SpecialKey,~:EndOfBuffer,@:NonText, d:Directory,e:ErrorMsg,i:IncSearch, l:Search,m:MoreMsg,M:ModeMsg,n:LineNr, - N:CursorLineNr,r:Question,s:StatusLine, - S:StatusLineNC,c:VertSplit,t:Title, + N:CursorLineNr,O:FoldedLineNr,r:Question, + s:StatusLine,S:StatusLineNC,c:VertSplit,t:Title, v:Visual,w:WarningMsg,W:WildMenu,f:Folded, F:FoldColumn,A:DiffAdd,C:DiffChange, D:DiffDelete,T:DiffText,>:SignColumn, @@ -4081,6 +4081,7 @@ A jump table for the options with a short description can be found at |Q_op|. when 'number' or 'relativenumber' option is set. |hl-CursorLineNr| N like n for when 'cursorline' or 'relativenumber' is set. + |hl-FoldedLineNr| O like n for closed |folds| |hl-Question| r |hit-enter| prompt and yes/no questions |hl-StatusLine| s status line of current window |status-line| |hl-StatusLineNC| S status lines of not-current windows @@ -5537,8 +5538,8 @@ A jump table for the options with a short description can be found at |Q_op|. number. When a long, wrapped line doesn't start with the first character, '-' characters are put before the number. - See |hl-LineNr| and |hl-CursorLineNr| for the highlighting used for - the number. + See |hl-LineNr|, |hl-CursorLineNr| and |hl-FoldedLineNr| for the + highlighting used for the number. *number_relativenumber* The 'relativenumber' option changes the displayed number to be relative to the cursor. Together with 'number' there are these @@ -6046,8 +6047,8 @@ A jump table for the options with a short description can be found at |Q_op|. number. When a long, wrapped line doesn't start with the first character, '-' characters are put before the number. - See |hl-LineNr| and |hl-CursorLineNr| for the highlighting used for - the number. + See |hl-LineNr|, |hl-CursorLineNr| and |hl-FoldedLineNr| for the + highlighting used for the number. The number in front of the cursor line also depends on the value of 'number', see |number_relativenumber| for all combinations of the two diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 8f887c428..f951af6fe 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -4971,6 +4971,8 @@ LineNr Line number for ":number" and ":#" commands, and when 'number' *hl-CursorLineNr* CursorLineNr Like LineNr when 'cursorline' or 'relativenumber' is set for the cursor line. + *hl-FoldedLineNr* +FoldedLineNr Like LineNr for closed |folds|. *hl-MatchParen* MatchParen The character under the cursor or just before it, if it is a paired bracket, and its match. |pi_paren.txt| diff --git a/runtime/doc/tags b/runtime/doc/tags index 1099b815f..653d7a41a 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -6775,6 +6775,7 @@ hl-EndOfBuffer syntax.txt /*hl-EndOfBuffer* hl-ErrorMsg syntax.txt /*hl-ErrorMsg* hl-FoldColumn syntax.txt /*hl-FoldColumn* hl-Folded syntax.txt /*hl-Folded* +hl-FoldedLineNr syntax.txt /*hl-FoldedLineNr* hl-Ignore syntax.txt /*hl-Ignore* hl-IncSearch syntax.txt /*hl-IncSearch* hl-LineNr syntax.txt /*hl-LineNr* diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index 85fb6a64a..76612a70e 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1582,9 +1582,6 @@ the command line. (Ingo Karkat, 2011 Jan 25) Since patch 7.2.46 Yankring plugin has become very slow, eventually make Vim crash? (Raiwil, 2010 Nov 17) -Patch to add FoldedLineNr highlighting: different highlighting for the line -number of a closed fold. (eXerigumo Clanjor, 2013 Jul 15) - Regexp engine performance: - Profiling: ./vim -u NONE -s ~/vim/test/ruby.vim diff --git a/src/option.c b/src/option.c index 2743f1607..9cdea6f40 100644 --- a/src/option.c +++ b/src/option.c @@ -473,7 +473,7 @@ struct vimoption # define ISP_LATIN1 (char_u *)"@,161-255" #endif -# define HIGHLIGHT_INIT "8:SpecialKey,~:EndOfBuffer,@:NonText,d:Directory,e:ErrorMsg,i:IncSearch,l:Search,m:MoreMsg,M:ModeMsg,n:LineNr,N:CursorLineNr,r:Question,s:StatusLine,S:StatusLineNC,c:VertSplit,t:Title,v:Visual,V:VisualNOS,w:WarningMsg,W:WildMenu,f:Folded,F:FoldColumn,A:DiffAdd,C:DiffChange,D:DiffDelete,T:DiffText,>:SignColumn,-:Conceal,B:SpellBad,P:SpellCap,R:SpellRare,L:SpellLocal,+:Pmenu,=:PmenuSel,x:PmenuSbar,X:PmenuThumb,*:TabLine,#:TabLineSel,_:TabLineFill,!:CursorColumn,.:CursorLine,o:ColorColumn,q:QuickFixLine,z:StatusLineTerm,Z:StatusLineTermNC" +# define HIGHLIGHT_INIT "8:SpecialKey,~:EndOfBuffer,@:NonText,d:Directory,e:ErrorMsg,i:IncSearch,l:Search,m:MoreMsg,M:ModeMsg,n:LineNr,O:FoldedLineNr,N:CursorLineNr,r:Question,s:StatusLine,S:StatusLineNC,c:VertSplit,t:Title,v:Visual,V:VisualNOS,w:WarningMsg,W:WildMenu,f:Folded,F:FoldColumn,A:DiffAdd,C:DiffChange,D:DiffDelete,T:DiffText,>:SignColumn,-:Conceal,B:SpellBad,P:SpellCap,R:SpellRare,L:SpellLocal,+:Pmenu,=:PmenuSel,x:PmenuSbar,X:PmenuThumb,*:TabLine,#:TabLineSel,_:TabLineFill,!:CursorColumn,.:CursorLine,o:ColorColumn,q:QuickFixLine,z:StatusLineTerm,Z:StatusLineTermNC" /* Default python version for pyx* commands */ #if defined(FEAT_PYTHON) && defined(FEAT_PYTHON3) diff --git a/src/screen.c b/src/screen.c index 3e08b600f..49d83c3ae 100644 --- a/src/screen.c +++ b/src/screen.c @@ -2751,7 +2751,7 @@ fold_line( HL_ATTR(HLF_FL)); else #endif - copy_text_attr(off + col, buf, len, HL_ATTR(HLF_FL)); + copy_text_attr(off + col, buf, len, HL_ATTR(HLF_FLN)); col += len; } } diff --git a/src/syntax.c b/src/syntax.c index 8444db38c..67b0249e7 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -6919,6 +6919,7 @@ static char *(highlight_init_both[]) = { "lCursor guibg=fg guifg=bg", /* should be different, but what? */ #endif "default link QuickFixLine Search", + "default link FoldedLineNr Folded", NULL }; diff --git a/src/vim.h b/src/vim.h index 4567c3663..9cd699589 100644 --- a/src/vim.h +++ b/src/vim.h @@ -1389,6 +1389,7 @@ typedef enum , HLF_CM /* Mode (e.g., "-- INSERT --") */ , HLF_N /* line number for ":number" and ":#" commands */ , HLF_CLN /* current line number */ + , HLF_FLN /* line number for closed folds */ , HLF_R /* return to continue message and yes/no questions */ , HLF_S /* status lines */ , HLF_SNC /* status lines of not-current windows */ @@ -1429,7 +1430,7 @@ typedef enum /* The HL_FLAGS must be in the same order as the HLF_ enums! * When changing this also adjust the default for 'highlight'. */ #define HL_FLAGS {'8', '~', '@', 'd', 'e', 'h', 'i', 'l', 'm', 'M', \ - 'n', 'N', 'r', 's', 'S', 'c', 't', 'v', 'V', 'w', 'W', \ + 'n', 'N', 'O', 'r', 's', 'S', 'c', 't', 'v', 'V', 'w', 'W', \ 'f', 'F', 'A', 'C', 'D', 'T', '-', '>', \ 'B', 'P', 'R', 'L', \ '+', '=', 'x', 'X', '*', '#', '_', '!', '.', 'o', 'q', \
