Set syntax in stack trace too

This commit is contained in:
Ben Jackson 2020-02-04 13:04:09 +00:00
commit 19cc58f09e
4 changed files with 52 additions and 34 deletions

View file

@ -501,3 +501,17 @@ def memoize( func ):
@memoize
def Exists( expr ):
return int( vim.eval( f'exists( "{ expr }" )' ) )
def SetSyntax( current_syntax, syntax, *args ):
if not syntax:
syntax = ''
if current_syntax == syntax:
return
for win in args:
with LetCurrentWindow( win ):
vim.command( 'set syntax={}'.format( Escape( syntax ) ) )
return syntax