diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-11-13 05:44:30 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-13 05:44:30 +0800 |
commit | 74e23b3b2ad91d4308c409b4f7419a1d3955a5bb (patch) | |
tree | 47951839aec3f600e46b9cbce6a5d46bee0f0b39 /runtime | |
parent | 4f8941c1a5f1ef6caa410feeb52e343db22763ce (diff) | |
download | rneovim-74e23b3b2ad91d4308c409b4f7419a1d3955a5bb.tar.gz rneovim-74e23b3b2ad91d4308c409b4f7419a1d3955a5bb.tar.bz2 rneovim-74e23b3b2ad91d4308c409b4f7419a1d3955a5bb.zip |
vim-patch:2dd613f57bf1 (#26009)
runtime(termdebug): improve the breakpoint sign label (vim/vim#13525)
// related vim/vim#12589
// that should be the last chat (I) with Bram, r.i.p
https://github.com/vim/vim/commit/2dd613f57bf17eb8ff050bcb5510eb0279f5c9ab
Co-authored-by: Shane-XB-Qian <shane.qian@foxmail.com>
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/nvim_terminal_emulator.txt | 6 | ||||
-rw-r--r-- | runtime/pack/dist/opt/termdebug/plugin/termdebug.vim | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/runtime/doc/nvim_terminal_emulator.txt b/runtime/doc/nvim_terminal_emulator.txt index f038163ec2..dbc14f5a44 100644 --- a/runtime/doc/nvim_terminal_emulator.txt +++ b/runtime/doc/nvim_terminal_emulator.txt @@ -537,9 +537,9 @@ If there is no g:termdebug_config you can use: >vim Change default signs ~ *termdebug_signs* -Termdebug uses the last two characters of the breakpoint ID in the -signcolumn to represent breakpoints. For example, breakpoint ID 133 -will be displayed as `33`. +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. If you want to customize the breakpoint signs: >vim let g:termdebug_config['sign'] = '>>' diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim index 8beca8ffb3..1b5baa9a8b 100644 --- a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim +++ b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim @@ -1781,9 +1781,9 @@ func s:CreateBreakpoint(id, subid, enabled) let label = get(g:termdebug_config, 'sign', '') endif if label == '' - let label = substitute(nr, '\..*', '', '') - if strlen(label) > 2 - let label = strpart(label, strlen(label) - 2) + let label = printf('%02X', a:id) + if a:id > 255 + let label = 'F+' endif endif call sign_define('debugBreakpoint' .. nr, |