Create a messagebox-like interface in vim
This commit is contained in:
parent
810946a1c1
commit
4fbafaa462
4 changed files with 87 additions and 16 deletions
|
|
@ -390,13 +390,17 @@ def ConfirmCallback( confirm_id, result ):
|
|||
handler( result )
|
||||
|
||||
|
||||
def Confirm( api_prefix, prompt, handler, default_value = 1 ):
|
||||
def Confirm( api_prefix, prompt, handler, default_value = 3, options = None ):
|
||||
global CONFIRM_ID
|
||||
if not options:
|
||||
options = [ '(Y)es', '(N)o', '(D)efault' ]
|
||||
|
||||
CONFIRM_ID += 1
|
||||
CONFIRM[ CONFIRM_ID ] = handler
|
||||
Call( f'vimspector#internal#{ api_prefix }popup#Confirm',
|
||||
CONFIRM_ID,
|
||||
prompt,
|
||||
options,
|
||||
default_value )
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue