Add SetLineBreakpoint and ClaerLineBreakpoint APIs

These are useful for running tests (i.e. ensure there's a breakpiont at
the start of the test) and/or other programmatic usages.

They will also be needed for setting temporary breakpionts.
This commit is contained in:
Ben Jackson 2020-10-13 22:16:11 +01:00
commit 0d112d70a0
5 changed files with 105 additions and 44 deletions

View file

@ -45,8 +45,10 @@ _logger = logging.getLogger( __name__ )
SetUpLogging( _logger )
def BufferNumberForFile( file_name ):
return int( vim.eval( "bufnr( '{0}', 1 )".format( Escape( file_name ) ) ) )
def BufferNumberForFile( file_name, create = True ):
return int( vim.eval( "bufnr( '{0}', {1} )".format(
Escape( file_name ),
int( create ) ) ) )
def BufferForFile( file_name ):