Can also be used as a |method|: >
GetBuffer()->prompt_getprompt()
+< {only available when compiled with the |+channel| feature}
+
prompt_setcallback({buf}, {expr}) *prompt_setcallback()*
Set prompt callback for buffer {buf} to {expr}. When {expr}
< Can also be used as a |method|: >
GetBuffer()->prompt_setcallback(callback)
+< {only available when compiled with the |+channel| feature}
prompt_setinterrupt({buf}, {expr}) *prompt_setinterrupt()*
Set a callback for buffer {buf} to {expr}. When {expr} is an
Can also be used as a |method|: >
GetBuffer()->prompt_setinterrupt(callback)
+< {only available when compiled with the |+channel| feature}
+
prompt_setprompt({buf}, {text}) *prompt_setprompt()*
Set prompt for buffer {buf} to {text}. You most likely want
{text} to end in a space.
Can also be used as a |method|: >
GetBuffer()->prompt_setprompt('command: ')
+< {only available when compiled with the |+channel| feature}
+
prop_ functions are documented here: |text-prop-functions|
pum_getpos() *pum_getpos()*
enddef
def Test_prompt_getprompt()
- CheckDefFailure(['prompt_getprompt([])'], 'E1013: Argument 1: type mismatch, expected string but got list<unknown>')
- assert_equal('', prompt_getprompt('NonExistingBuf'))
+ if has('channel')
+ CheckDefFailure(['prompt_getprompt([])'], 'E1013: Argument 1: type mismatch, expected string but got list<unknown>')
+ assert_equal('', prompt_getprompt('NonExistingBuf'))
+ endif
enddef
def Test_rand()