Patch 9.0.1659
Problem: Termdebug: default highlight cleared when changing colorscheme.
Solution: Use a ColorScheme autocommand. (Christian Brabandt, closes #12566,
closes #12555)
Files: runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
*** ../vim-9.0.1658/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
2022-06-24 16:44:27.000000000 +0100
--- runtime/pack/dist/opt/termdebug/plugin/termdebug.vim 2023-06-24
14:16:49.548273511 +0100
***************
*** 2,8 ****
"
" Author: Bram Moolenaar
" Copyright: Vim license applies, see ":help license"
! " Last Change: 2022 Jun 24
"
" WORK IN PROGRESS - The basics works stable, more to come
" Note: In general you need at least GDB 7.12 because this provides the
--- 2,8 ----
"
" Author: Bram Moolenaar
" Copyright: Vim license applies, see ":help license"
! " Last Change: 2023 Jun 24
"
" WORK IN PROGRESS - The basics works stable, more to come
" Note: In general you need at least GDB 7.12 because this provides the
***************
*** 81,86 ****
--- 81,88 ----
return s:break_id + a:id * 1000 + a:subid
endfunction
+ " Define or adjust the default highlighting, using background "new".
+ " When the 'background' option is set then "old" has the old value.
func s:Highlight(init, old, new)
let default = a:init ? 'default ' : ''
if a:new ==# 'light' && a:old !=# 'light'
***************
*** 90,98 ****
endif
endfunc
! call s:Highlight(1, '', &background)
! hi default debugBreakpoint term=reverse ctermbg=red guibg=red
! hi default debugBreakpointDisabled term=reverse ctermbg=gray guibg=gray
" Get the command to execute the debugger as a list, defaults to ["gdb"].
func s:GetCommand()
--- 92,112 ----
endif
endfunc
! " Define the default highlighting, using the current 'background' value.
! func s:InitHighlight()
! call s:Highlight(1, '', &background)
! hi default debugBreakpoint term=reverse ctermbg=red guibg=red
! hi default debugBreakpointDisabled term=reverse ctermbg=gray guibg=gray
! endfunc
!
! " Setup an autocommand to redefine the default highlight when the colorscheme
! " is changed.
! func s:InitAutocmd()
! augroup TermDebug
! autocmd!
! autocmd ColorScheme * call s:InitHighlight()
! augroup END
! endfunc
" Get the command to execute the debugger as a list, defaults to ["gdb"].
func s:GetCommand()
***************
*** 1516,1520 ****
--- 1536,1543 ----
endfor
endfunc
+ call s:InitHighlight()
+ call s:InitAutocmd()
+
let &cpo = s:keepcpo
unlet s:keepcpo
*** ../vim-9.0.1658/src/version.c 2023-06-24 13:30:00.067004980 +0100
--- src/version.c 2023-06-24 14:11:50.097105356 +0100
***************
*** 697,698 ****
--- 697,700 ----
{ /* Add new patch number below this line */
+ /**/
+ 1659,
/**/
--
hundred-and-one symptoms of being an internet addict:
204. You have learned not to fall asleep on your keyboard
the hard way
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20230624133235.B16BC1C054C%40moolenaar.net.