diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-06-29 07:04:46 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-29 07:04:46 +0800 |
commit | 421c66f741bf4ed4de6bf15df19160df0f90db4b (patch) | |
tree | aa85c99669de7d92b7cdeaf039a04b377439804e /runtime/pack/dist/opt/termdebug/plugin/termdebug.vim | |
parent | a878e02d5de7e7a842bf7a8e3a0fd19b3a2a2f6e (diff) | |
download | rneovim-421c66f741bf4ed4de6bf15df19160df0f90db4b.tar.gz rneovim-421c66f741bf4ed4de6bf15df19160df0f90db4b.tar.bz2 rneovim-421c66f741bf4ed4de6bf15df19160df0f90db4b.zip |
vim-patch:9.0.1671: Termdebug: error with more than 99 breakpoints (#24194)
Problem: Termdebug: error with more than 99 breakpoints.
Solution: Use a different sign for breakpoint 100 and over. (closes vim/vim#12589,
closes vim/vim#12588)
https://github.com/vim/vim/commit/e7d9ca2b3bf99b0b759be8952e02c77110a354c1
Co-authored-by: skywind3000 <skywind3000@163.com>
Diffstat (limited to 'runtime/pack/dist/opt/termdebug/plugin/termdebug.vim')
-rw-r--r-- | runtime/pack/dist/opt/termdebug/plugin/termdebug.vim | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim index d4b49e85c8..e8b78b3f5f 100644 --- a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim +++ b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim @@ -1543,8 +1543,18 @@ func s:CreateBreakpoint(id, subid, enabled) else let hiName = "debugBreakpoint" endif + let label = '' + if exists('g:termdebug_config') + 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) + endif + endif call sign_define('debugBreakpoint' .. nr, - \ #{text: substitute(nr, '\..*', '', ''), + \ #{text: strpart(label, 0, 2), \ texthl: hiName}) endif endfunc |