1 To: vim_dev@googlegroups.com
4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: When 'cursorline' is set the line number highlighting can't be set
13 Solution: Add "CursorLineNr". (Howard Buchholz)
14 Files: src/option.c, src/screen.c, src/syntax.c, src/vim.h
17 *** ../vim-7.3.478/src/option.c 2012-02-29 13:51:32.000000000 +0100
18 --- src/option.c 2012-03-23 15:44:57.000000000 +0100
21 #if defined(FEAT_DIFF) || defined(FEAT_FOLDING) || defined(FEAT_SPELL) \
22 || defined(FEAT_VERTSPLIT) || defined(FEAT_CLIPBOARD) \
23 || defined(FEAT_INS_EXPAND) || defined(FEAT_SYN_HL) || defined(FEAT_CONCEAL)
24 ! # 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"
26 ! # 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"
31 #if defined(FEAT_DIFF) || defined(FEAT_FOLDING) || defined(FEAT_SPELL) \
32 || defined(FEAT_VERTSPLIT) || defined(FEAT_CLIPBOARD) \
33 || defined(FEAT_INS_EXPAND) || defined(FEAT_SYN_HL) || defined(FEAT_CONCEAL)
34 ! # 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"
36 ! # 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"
40 *** ../vim-7.3.478/src/screen.c 2012-03-16 19:07:54.000000000 +0100
41 --- src/screen.c 2012-03-23 16:09:15.000000000 +0100
44 char_attr = hl_attr(HLF_N);
46 /* When 'cursorline' is set highlight the line number of
47 ! * the current line differently. */
48 if (wp->w_p_cul && lnum == wp->w_cursor.lnum)
49 ! char_attr = hl_combine_attr(hl_attr(HLF_CUL), char_attr);
54 char_attr = hl_attr(HLF_N);
56 /* When 'cursorline' is set highlight the line number of
57 ! * the current line differently.
58 ! * TODO: Can we use CursorLine instead of CursorLineNr
59 ! * when CursorLineNr isn't set? */
60 if (wp->w_p_cul && lnum == wp->w_cursor.lnum)
61 ! char_attr = hl_attr(HLF_CLN);
65 *** ../vim-7.3.478/src/syntax.c 2012-03-16 20:16:42.000000000 +0100
66 --- src/syntax.c 2012-03-23 16:23:57.000000000 +0100
70 "Directory term=bold ctermfg=DarkBlue guifg=Blue"),
71 CENT("LineNr term=underline ctermfg=Brown",
72 "LineNr term=underline ctermfg=Brown guifg=Brown"),
73 + CENT("CursorLineNr term=bold ctermfg=Brown",
74 + "CursorLineNr term=bold ctermfg=Brown gui=bold guifg=Brown"),
75 CENT("MoreMsg term=bold ctermfg=DarkGreen",
76 "MoreMsg term=bold ctermfg=DarkGreen gui=bold guifg=SeaGreen"),
77 CENT("Question term=standout ctermfg=DarkGreen",
81 "Directory term=bold ctermfg=LightCyan guifg=Cyan"),
82 CENT("LineNr term=underline ctermfg=Yellow",
83 "LineNr term=underline ctermfg=Yellow guifg=Yellow"),
84 + CENT("CursorLineNr term=bold ctermfg=Yellow",
85 + "CursorLineNr term=bold ctermfg=Yellow gui=bold guifg=Yellow"),
86 CENT("MoreMsg term=bold ctermfg=LightGreen",
87 "MoreMsg term=bold ctermfg=LightGreen gui=bold guifg=SeaGreen"),
88 CENT("Question term=standout ctermfg=LightGreen",
89 *** ../vim-7.3.478/src/vim.h 2012-03-07 19:16:49.000000000 +0100
90 --- src/vim.h 2012-03-23 15:44:57.000000000 +0100
94 , HLF_M /* "--More--" message */
95 , HLF_CM /* Mode (e.g., "-- INSERT --") */
96 , HLF_N /* line number for ":number" and ":#" commands */
97 + , HLF_CLN /* current line number */
98 , HLF_R /* return to continue message and yes/no questions */
99 , HLF_S /* status lines */
100 , HLF_SNC /* status lines of not-current windows */
103 /* The HL_FLAGS must be in the same order as the HLF_ enums!
104 * When changing this also adjust the default for 'highlight'. */
105 #define HL_FLAGS {'8', '@', 'd', 'e', 'h', 'i', 'l', 'm', 'M', \
106 ! 'n', 'r', 's', 'S', 'c', 't', 'v', 'V', 'w', 'W', \
107 'f', 'F', 'A', 'C', 'D', 'T', '-', '>', \
108 'B', 'P', 'R', 'L', \
109 '+', '=', 'x', 'X', '*', '#', '_', '!', '.', 'o'}
111 /* The HL_FLAGS must be in the same order as the HLF_ enums!
112 * When changing this also adjust the default for 'highlight'. */
113 #define HL_FLAGS {'8', '@', 'd', 'e', 'h', 'i', 'l', 'm', 'M', \
114 ! 'n', 'N', 'r', 's', 'S', 'c', 't', 'v', 'V', 'w', 'W', \
115 'f', 'F', 'A', 'C', 'D', 'T', '-', '>', \
116 'B', 'P', 'R', 'L', \
117 '+', '=', 'x', 'X', '*', '#', '_', '!', '.', 'o'}
118 *** ../vim-7.3.478/src/version.c 2012-03-23 15:36:57.000000000 +0100
119 --- src/version.c 2012-03-23 16:16:41.000000000 +0100
123 { /* Add new patch number below this line */
129 If you're sending someone Styrofoam, what do you pack it in?
131 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
132 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
133 \\\ an exciting new programming language -- http://www.Zimbu.org ///
134 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///