Use CursorLine highlihgt to highlight current PC line
This commit is contained in:
parent
b2456b587f
commit
dffd65f241
5 changed files with 97 additions and 6 deletions
|
|
@ -53,7 +53,8 @@ class CodeView( object ):
|
|||
if not signs.SignDefined( 'vimspectorPC' ):
|
||||
signs.DefineSign( 'vimspectorPC',
|
||||
text = '▶',
|
||||
texthl = 'MatchParen' )
|
||||
texthl = 'MatchParen',
|
||||
linehl = 'CursorLine' )
|
||||
|
||||
|
||||
def SetCurrentFrame( self, frame ):
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ DEFAULTS = {
|
|||
|
||||
# Signs
|
||||
'sign_priority': {
|
||||
'vimspectorPC': 20,
|
||||
'vimspectorPC': 200,
|
||||
'vimspectorBP': 9,
|
||||
'vimspectorBPCond': 9,
|
||||
'vimspectorBPDisabled': 9,
|
||||
|
|
|
|||
|
|
@ -12,14 +12,18 @@ def SignDefined( name ):
|
|||
return False
|
||||
|
||||
|
||||
def DefineSign( name, text, texthl, col = 'right' ):
|
||||
def DefineSign( name, text, texthl, col = 'right', **kwargs ):
|
||||
if col == 'right':
|
||||
if int( utils.Call( 'strdisplaywidth', text ) ) < 2:
|
||||
text = ' ' + text
|
||||
|
||||
text = text.replace( ' ', r'\ ' )
|
||||
|
||||
vim.command( f'sign define { name } text={ text } texthl={ texthl }' )
|
||||
cmd = f'sign define { name } text={ text } texthl={ texthl }'
|
||||
for key, value in kwargs.items():
|
||||
cmd += f' { key }={ value }'
|
||||
|
||||
vim.command( cmd )
|
||||
|
||||
|
||||
def PlaceSign( sign_id, group, name, file, line ):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue