File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,10 @@ syntax reset
12
12
" endif
13
13
let g: colors_name = ' one'
14
14
15
+ if ! exists (" g:one_allow_italics" )
16
+ let g: one_allow_italics = 0
17
+ endif
18
+
15
19
if has (' gui_running' ) || &t_Co == 88 || &t_Co == 256
16
20
" functions
17
21
" returns an approximate grey index for the given grey level
@@ -212,14 +216,19 @@ if has('gui_running') || &t_Co == 88 || &t_Co == 256
212
216
213
217
" sets the highlighting for the given group
214
218
fun <SID> X (group, fg , bg , attr)
219
+ let l: attr = a: attr
220
+ if g: one_allow_italics == 0 && l: attr == ? ' italic'
221
+ let l: attr= ' none'
222
+ endif
223
+
215
224
if a: fg !=? ' '
216
225
exec ' hi ' . a: group . ' guifg=#' . a: fg . ' ctermfg=' . <SID> rgb (a: fg )
217
226
endif
218
227
if a: bg !=? ' '
219
228
exec ' hi ' . a: group . ' guibg=#' . a: bg . ' ctermbg=' . <SID> rgb (a: bg )
220
229
endif
221
230
if a: attr !=? ' '
222
- exec ' hi ' . a: group . ' gui=' . a : attr . ' cterm=' . a : attr
231
+ exec ' hi ' . a: group . ' gui=' . l : attr . ' cterm=' . l : attr
223
232
endif
224
233
endfun
225
234
You can’t perform that action at this time.
0 commit comments