1
0
forked from aniani/vim

patch 9.0.1671: Termdebug: error with more than 99 breakpoints

Problem:    Termdebug: error with more than 99 breakpoints.
Solution:   Use a different sign for breakpoint 100 and over. (closes #12589,
            closes #12588)
This commit is contained in:
skywind3000
2023-06-28 23:27:28 +01:00
committed by Bram Moolenaar
parent bf5f189e44
commit e7d9ca2b3b
3 changed files with 29 additions and 3 deletions

View File

@@ -1401,9 +1401,19 @@ 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, '\..*', '', ''),
\ texthl: hiName})
\ #{text: strpart(label, 0, 2),
\ texthl: hiName})
endif
endfunc