Added a test. See attached patch. Ready to merge if you ask me.

By default FoldedLineNr is linked to Folded (this makes sense because
before they used to be the same thing).

Bram, please have a look at it. ;-)

-- 
-- 
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.
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index ebe9c9262..33e397846 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1,4 +1,4 @@
-*options.txt*	For Vim version 8.0.  Last change: 2017 Sep 24
+*options.txt*	For Vim version 8.0.  Last change: 2017 Oct 12
 
 
 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
@@ -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..fb725fee4 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -1,4 +1,4 @@
-*syntax.txt*	For Vim version 8.0.  Last change: 2017 Aug 12
+*syntax.txt*	For Vim version 8.0.  Last change: 2017 Oct 12
 
 
 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
@@ -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..9f59f0f72 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt*      For Vim version 8.0.  Last change: 2017 Sep 27
+*todo.txt*      For Vim version 8.0.  Last change: 2017 Oct 12
 
 
 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
@@ -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..518b4a3d3 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -2748,10 +2748,10 @@ fold_line(
 	    if (wp->w_p_rl)
 		/* the line number isn't reversed */
 		copy_text_attr(off + wp->w_width - len - col, buf, len,
-							     HL_ATTR(HLF_FL));
+							     HL_ATTR(HLF_FLN));
 	    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/testdir/runtest.vim b/src/testdir/runtest.vim
index d07710afc..ae7a4d637 100644
--- a/src/testdir/runtest.vim
+++ b/src/testdir/runtest.vim
@@ -143,6 +143,7 @@ func RunTheTest(test)
 endfunc
 
 func AfterTheTest()
+  sleep 1
   if len(v:errors) > 0
     let s:fail += 1
     call add(s:errors, 'Found errors in ' . s:test . ':')
diff --git a/src/testdir/test_highlight.vim b/src/testdir/test_highlight.vim
index f3d7d0f2a..0b571ead6 100644
--- a/src/testdir/test_highlight.vim
+++ b/src/testdir/test_highlight.vim
@@ -514,3 +514,16 @@ func Test_highlight_eol_on_diff()
   bwipe!
   diffoff
 endfunc
+
+func Test_highlight_foldedlinenr()
+  new
+
+  setlocal number
+  call setline(1, [1, 2, 3])
+  norm zfj
+  call assert_notequal(ScreenAttrs(1, 1), ScreenAttrs(2, 1))
+  hi link FoldedLineNr LineNr
+  call assert_equal(ScreenAttrs(1, 1), ScreenAttrs(2, 1))
+
+  bwipe!
+endfunc
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', \

Raspunde prin e-mail lui