forked from aniani/vim
patch 8.1.0081: the terminal debugger doesn't adjust to changed 'background'
Problem: The terminal debugger doesn't adjust to changed 'background'. Solution: Add an OptionSet autocommand. (Christian Brabandt)
This commit is contained in:
@@ -70,11 +70,16 @@ let s:pc_id = 12
|
|||||||
let s:break_id = 13 " breakpoint number is added to this
|
let s:break_id = 13 " breakpoint number is added to this
|
||||||
let s:stopped = 1
|
let s:stopped = 1
|
||||||
|
|
||||||
if &background == 'light'
|
func s:Highlight(init, old, new)
|
||||||
hi default debugPC term=reverse ctermbg=lightblue guibg=lightblue
|
let default = a:init ? 'default ' : ''
|
||||||
else
|
if a:new ==# 'light' && a:old !=# 'light'
|
||||||
hi default debugPC term=reverse ctermbg=darkblue guibg=darkblue
|
exe "hi " . default . "debugPC term=reverse ctermbg=lightblue guibg=lightblue"
|
||||||
endif
|
elseif a:new ==# 'dark' && a:old !=# 'dark'
|
||||||
|
exe "hi " . default . "debugPC term=reverse ctermbg=darkblue guibg=darkblue"
|
||||||
|
endif
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
call s:Highlight(1, '', &background)
|
||||||
hi default debugBreakpoint term=reverse ctermbg=red guibg=red
|
hi default debugBreakpoint term=reverse ctermbg=red guibg=red
|
||||||
|
|
||||||
func s:StartDebug(bang, ...)
|
func s:StartDebug(bang, ...)
|
||||||
@@ -347,6 +352,7 @@ func s:StartDebugCommon(dict)
|
|||||||
augroup TermDebug
|
augroup TermDebug
|
||||||
au BufRead * call s:BufRead()
|
au BufRead * call s:BufRead()
|
||||||
au BufUnload * call s:BufUnloaded()
|
au BufUnload * call s:BufUnloaded()
|
||||||
|
au OptionSet background call s:Highlight(0, v:option_old, v:option_new)
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
" Run the command if the bang attribute was given and got to the debug
|
" Run the command if the bang attribute was given and got to the debug
|
||||||
@@ -887,4 +893,3 @@ func s:BufUnloaded()
|
|||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
@@ -761,6 +761,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
81,
|
||||||
/**/
|
/**/
|
||||||
80,
|
80,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user