]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.479 v7.3.479
authorBram Moolenaar <Bram@vim.org>
Fri, 23 Mar 2012 15:25:17 +0000 (16:25 +0100)
committerBram Moolenaar <Bram@vim.org>
Fri, 23 Mar 2012 15:25:17 +0000 (16:25 +0100)
Problem:    When 'cursorline' is set the line number highlighting can't be set
            separately.
Solution:   Add "CursorLineNr". (Howard Buchholz)

src/option.c
src/screen.c
src/syntax.c
src/version.c
src/vim.h

index b71830f743bdb9012c4e056b902a3c87ec3e622d..67d0bc7067fada60731bf23cc07b2afc95f63182 100644 (file)
@@ -460,9 +460,9 @@ struct vimoption
 #if defined(FEAT_DIFF) || defined(FEAT_FOLDING) || defined(FEAT_SPELL) \
        || defined(FEAT_VERTSPLIT) || defined(FEAT_CLIPBOARD) \
        || defined(FEAT_INS_EXPAND) || defined(FEAT_SYN_HL) || defined(FEAT_CONCEAL)
-# define HIGHLIGHT_INIT "8:SpecialKey,@:NonText,d:Directory,e:ErrorMsg,i:IncSearch,l:Search,m:MoreMsg,M:ModeMsg,n:LineNr,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"
+# define HIGHLIGHT_INIT "8:SpecialKey,@: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"
 #else
-# define HIGHLIGHT_INIT "8:SpecialKey,@:NonText,d:Directory,e:ErrorMsg,i:IncSearch,l:Search,m:MoreMsg,M:ModeMsg,n:LineNr,r:Question,s:StatusLine,S:StatusLineNC,t:Title,v:Visual,w:WarningMsg,W:WildMenu,>:SignColumn,*:TabLine,#:TabLineSel,_:TabLineFill"
+# define HIGHLIGHT_INIT "8:SpecialKey,@:NonText,d:Directory,e:ErrorMsg,i:IncSearch,l:Search,m:MoreMsg,M:ModeMsg,n:LineNr,N:CursorLineNr,r:Question,s:StatusLine,S:StatusLineNC,t:Title,v:Visual,w:WarningMsg,W:WildMenu,>:SignColumn,*:TabLine,#:TabLineSel,_:TabLineFill"
 #endif
 
 /*
index 97d636d700dc02c435306182ced3aacee290762e..fd74707e0024af56dab0710eef82925db60b174e 100644 (file)
@@ -3501,9 +3501,11 @@ win_line(wp, lnum, startrow, endrow, nochange)
                    char_attr = hl_attr(HLF_N);
 #ifdef FEAT_SYN_HL
                    /* When 'cursorline' is set highlight the line number of
-                    * the current line differently. */
+                    * the current line differently.
+                    * TODO: Can we use CursorLine instead of CursorLineNr
+                    * when CursorLineNr isn't set? */
                    if (wp->w_p_cul && lnum == wp->w_cursor.lnum)
-                       char_attr = hl_combine_attr(hl_attr(HLF_CUL), char_attr);
+                       char_attr = hl_attr(HLF_CLN);
 #endif
                }
            }
index 7b045680d7fae851916b21f047a4abbecedf3431..b5bffc31ad53e021644db00435988d49e9472480 100644 (file)
@@ -6538,6 +6538,8 @@ static char *(highlight_init_light[]) =
             "Directory term=bold ctermfg=DarkBlue guifg=Blue"),
        CENT("LineNr term=underline ctermfg=Brown",
             "LineNr term=underline ctermfg=Brown guifg=Brown"),
+       CENT("CursorLineNr term=bold ctermfg=Brown",
+            "CursorLineNr term=bold ctermfg=Brown gui=bold guifg=Brown"),
        CENT("MoreMsg term=bold ctermfg=DarkGreen",
             "MoreMsg term=bold ctermfg=DarkGreen gui=bold guifg=SeaGreen"),
        CENT("Question term=standout ctermfg=DarkGreen",
@@ -6626,6 +6628,8 @@ static char *(highlight_init_dark[]) =
             "Directory term=bold ctermfg=LightCyan guifg=Cyan"),
        CENT("LineNr term=underline ctermfg=Yellow",
             "LineNr term=underline ctermfg=Yellow guifg=Yellow"),
+       CENT("CursorLineNr term=bold ctermfg=Yellow",
+            "CursorLineNr term=bold ctermfg=Yellow gui=bold guifg=Yellow"),
        CENT("MoreMsg term=bold ctermfg=LightGreen",
             "MoreMsg term=bold ctermfg=LightGreen gui=bold guifg=SeaGreen"),
        CENT("Question term=standout ctermfg=LightGreen",
index b1b1a524b15c7d382e68df5418ff426a1de5c228..883fec138c2c1870e39e74194b50132807dc4f36 100644 (file)
@@ -714,6 +714,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    479,
 /**/
     478,
 /**/
index be182287d28ccc25ad5a23752d5d433dc1a71fef..b67702b5815637b85b08a18e0c4aacd6c802dbba 100644 (file)
--- a/src/vim.h
+++ b/src/vim.h
@@ -1318,6 +1318,7 @@ typedef enum
     , HLF_M        /* "--More--" message */
     , HLF_CM       /* Mode (e.g., "-- INSERT --") */
     , HLF_N        /* line number for ":number" and ":#" commands */
+    , HLF_CLN      /* current line number */
     , HLF_R        /* return to continue message and yes/no questions */
     , HLF_S        /* status lines */
     , HLF_SNC      /* status lines of not-current windows */
@@ -1355,7 +1356,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', 'r', 's', 'S', 'c', 't', 'v', 'V', 'w', 'W', \
+                 'n', 'N', 'r', 's', 'S', 'c', 't', 'v', 'V', 'w', 'W', \
                  'f', 'F', 'A', 'C', 'D', 'T', '-', '>', \
                  'B', 'P', 'R', 'L', \
                  '+', '=', 'x', 'X', '*', '#', '_', '!', '.', 'o'}