summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-06-17 19:36:33 +0200
committerBram Moolenaar <Bram@vim.org>2018-06-17 19:36:33 +0200
commit0e5979a6d491f68c4a8c86fab489016919329a6b (patch)
tree9b2ae8d0a64cefadf20aafd660a0fce2558dfe39 /runtime
parent2f82ca7d79148ae931bf28a747ede06ba8a65de8 (diff)
downloadvim-git-0e5979a6d491f68c4a8c86fab489016919329a6b.tar.gz
patch 8.1.0069: cannot handle pressing CTRL-C in a prompt bufferv8.1.0069
Problem: Cannot handle pressing CTRL-C in a prompt buffer. Solution: Add prompt_setinterrupt().
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/eval.txt38
1 files changed, 26 insertions, 12 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index ead6b8928..36e4f22ba 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -2297,8 +2297,9 @@ pow({x}, {y}) Float {x} to the power of {y}
prevnonblank({lnum}) Number line nr of non-blank line <= {lnum}
printf({fmt}, {expr1}...) String format text
prompt_addtext({buf}, {expr}) none add text to a prompt buffer
-prompt_setprompt({buf}, {text}) none set prompt text
prompt_setcallback({buf}, {expr}) none set prompt callback function
+prompt_setinterrupt({buf}, {text}) none set prompt interrupt function
+prompt_setprompt({buf}, {text}) none set prompt text
pumvisible() Number whether popup menu is visible
pyeval({expr}) any evaluate |Python| expression
py3eval({expr}) any evaluate |python3| expression
@@ -6506,17 +6507,11 @@ printf({fmt}, {expr1} ...) *printf()*
arguments an error is given. Up to 18 arguments can be used.
-prompt_setprompt({buf}, {text}) *prompt_setprompt()*
- Set prompt for buffer {buf} to {text}. You most likely want
- {text} to end in a space.
- The result is only visible if {buf} has 'buftype' set to
- "prompt". Example: >
- call prompt_setprompt(bufnr(''), 'command: ')
-
-
prompt_setcallback({buf}, {expr}) *prompt_setcallback()*
- Set prompt callback for buffer {buf} to {expr}. This has only
+ Set prompt callback for buffer {buf} to {expr}. When {expr}
+ is an empty string the callback is removed. This has only
effect if {buf} has 'buftype' set to "prompt".
+
The callback is invoked when pressing Enter. The current
buffer will always be the prompt buffer. A new line for a
prompt is added before invoking the callback, thus the prompt
@@ -6541,6 +6536,22 @@ prompt_setcallback({buf}, {expr}) *prompt_setcallback()*
endif
endfunc
+prompt_setinterrupt({buf}, {expr}) *prompt_setinterrupt()*
+ Set a callback for buffer {buf} to {expr}. When {expr} is an
+ empty string the callback is removed. This has only effect if
+ {buf} has 'buftype' set to "prompt".
+
+ This callback will be invoked when pressing CTRL-C in Insert
+ mode. Without setting a callback Vim will exit Insert mode,
+ as in any buffer.
+
+prompt_setprompt({buf}, {text}) *prompt_setprompt()*
+ Set prompt for buffer {buf} to {text}. You most likely want
+ {text} to end in a space.
+ The result is only visible if {buf} has 'buftype' set to
+ "prompt". Example: >
+ call prompt_setprompt(bufnr(''), 'command: ')
+
pumvisible() *pumvisible()*
Returns non-zero when the popup menu is visible, zero
@@ -8563,7 +8574,9 @@ term_start({cmd}, {options}) *term_start()*
instead of using 'termwinsize'
"term_cols" horizontal size to use for the terminal,
instead of using 'termwinsize'
- "vertical" split the window vertically
+ "vertical" split the window vertically; note that
+ other window position can be defined with
+ command modifiers, such as |:belowright|.
"curwin" use the current window, do not split the
window; fails if the current buffer
cannot be |abandon|ed
@@ -9392,11 +9405,12 @@ vtp Compiled for vcon support |+vtp| (check vcon to find
out if it works in the current console).
wildignore Compiled with 'wildignore' option.
wildmenu Compiled with 'wildmenu' option.
+win16 old version for MS-Windows 3.1 (always False)
win32 Win32 version of Vim (MS-Windows 95 and later, 32 or
64 bits)
win32unix Win32 version of Vim, using Unix files (Cygwin)
win64 Win64 version of Vim (MS-Windows 64 bit).
-win95 Win32 version for MS-Windows 95/98/ME.
+win95 Win32 version for MS-Windows 95/98/ME (always False)
winaltkeys Compiled with 'winaltkeys' option.
windows Compiled with support for more than one window.
writebackup Compiled with 'writebackup' default on.