Use CursorLine highlihgt to highlight current PC line

This commit is contained in:
Ben Jackson 2020-09-01 16:30:16 +01:00
commit dffd65f241
5 changed files with 97 additions and 6 deletions

View file

@ -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 ):

View file

@ -28,7 +28,7 @@ DEFAULTS = {
# Signs
'sign_priority': {
'vimspectorPC': 20,
'vimspectorPC': 200,
'vimspectorBP': 9,
'vimspectorBPCond': 9,
'vimspectorBPDisabled': 9,

View file

@ -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 ):