Skip to content

Commit

Permalink
runtime(termdebug): allow to use decimal signs
Browse files Browse the repository at this point in the history
closes: #16011

Co-authored-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Ella Moss <ella.moss@utah.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
  • Loading branch information
accellarando and chrisbra committed Nov 9, 2024
1 parent 815c822 commit 5e7f43b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
12 changes: 8 additions & 4 deletions runtime/doc/terminal.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*terminal.txt* For Vim version 9.1. Last change: 2024 Oct 27
*terminal.txt* For Vim version 9.1. Last change: 2024 Nov 09


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -1683,13 +1683,17 @@ Change default signs ~
Termdebug uses the hex number of the breakpoint ID in the signcolumn to
represent breakpoints. If it is greater than "0xFF", then it will be displayed
as "F+", due to we really only have two screen cells for the sign.
You may also use decimal breakpoint signs instead, in which case IDs greater
than 99 will be displayed as "9+".

If you want to customize the breakpoint signs: >
If you want to customize the breakpoint signs to show `>>` in the signcolumn: >
let g:termdebug_config['sign'] = '>>'
If you would like to use decimal (base 10) breakpoint signs: >
let g:termdebug_config['sign_decimal'] = 1
If there is no g:terminal_config yet you can use: >
let g:termdebug_config = {'sign': '>>'}
After this, breakpoints will be displayed as `>>` in the signcolumn.
Likewise, to enable decimal signs: >
let g:termdebug_config = {'sign_decimal': 1}
Window toolbar ~
Expand Down
5 changes: 5 additions & 0 deletions runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
Original file line number Diff line number Diff line change
Expand Up @@ -1912,6 +1912,11 @@ def CreateBreakpoint(id: number, subid: number, enabled: string)
var label = ''
if exists('g:termdebug_config') && has_key(g:termdebug_config, 'sign')
label = g:termdebug_config['sign']
elseif exists('g:termdebug_config') && has_key(g:termdebug_config, 'sign_decimal')
label = printf('%02d', id)
if id > 99
label = '9+'
endif
else
label = printf('%02X', id)
if id > 255
Expand Down

0 comments on commit 5e7f43b

Please sign in to comment.