diff options
author | zeertzjq <zeertzjq@outlook.com> | 2025-02-03 08:09:03 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-03 00:09:03 +0000 |
commit | af069c5c05ad99623345071007ad23da51973601 (patch) | |
tree | a18c6dd9be94e6de35ea09057c54084657551b0d /runtime/doc | |
parent | 87e806186c721f12c338af86677b6d1e6e2fa44a (diff) | |
download | rneovim-af069c5c05ad99623345071007ad23da51973601.tar.gz rneovim-af069c5c05ad99623345071007ad23da51973601.tar.bz2 rneovim-af069c5c05ad99623345071007ad23da51973601.zip |
vim-patch:9.1.1070: Cannot control cursor positioning of getchar() (#32303)
Problem: Cannot control cursor positioning of getchar().
Solution: Add "cursor" flag to {opts}, with possible values "hide",
"keep" and "msg".
related: vim/vim#10603
closes: vim/vim#16569
https://github.com/vim/vim/commit/edf0f7db28f87611368e158210e58ed30f673098
Diffstat (limited to 'runtime/doc')
-rw-r--r-- | runtime/doc/builtin.txt | 8 | ||||
-rw-r--r-- | runtime/doc/news.txt | 5 |
2 files changed, 13 insertions, 0 deletions
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index 3d9010aa2c..96574e2899 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -3114,6 +3114,14 @@ getchar([{expr} [, {opts}]]) *getchar()* The optional argument {opts} is a Dict and supports the following items: + cursor A String specifying cursor behavior + when waiting for a character. + "hide": hide the cursor. + "keep": keep current cursor unchanged. + "msg": move cursor to message area. + (default: automagically decide + between "keep" and "msg") + number If |TRUE|, return a Number when getting a single character. If |FALSE|, the return value is always diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 2208428f75..eda8d945cb 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -410,6 +410,11 @@ UI • |:checkhealth| can display in a floating window, controlled by the |g:health| variable. +VIMSCRIPT + +• |getchar()| and |getcharstr()| have optional {opts} |Dict| argument to control: + cursor behavior, return type, and whether to simplify the returned key. + ============================================================================== CHANGED FEATURES *news-changed* |