diff options
author | ZyX <kp-pav@yandex.ru> | 2017-04-02 01:00:40 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-06-27 01:34:54 +0300 |
commit | 407abb3a6c5c1c706bf8797a1431e57e97a6b797 (patch) | |
tree | f4d2171c0ea34db451b43495b284d7f73d72e98e /runtime | |
parent | d82741f8c04d003bb9925d9c46d7e07179810ed4 (diff) | |
download | rneovim-407abb3a6c5c1c706bf8797a1431e57e97a6b797.tar.gz rneovim-407abb3a6c5c1c706bf8797a1431e57e97a6b797.tar.bz2 rneovim-407abb3a6c5c1c706bf8797a1431e57e97a6b797.zip |
eval,ex_getln: Add support for coloring input() prompts
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/eval.txt | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 2a73590c76..2262c01374 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -4699,6 +4699,7 @@ input({opts}) cancelreturn "" Same as {cancelreturn} from |inputdialog()|. Also works with input(). + highlight nothing Highlight handler: |Funcref|. The highlighting set with |:echohl| is used for the prompt. The input is entered just like a command-line, with the same @@ -4722,6 +4723,22 @@ input({opts}) more information. Example: > let fname = input("File: ", "", "file") < + The optional highlight key allows specifying function which + will be used for highlighting. This function receives user + input as its only argument and must return a list of 3-tuples + [hl_start_byte, hl_end_byte + 1, hl_group] where + hl_start_byte is the first highlighted byte, + hl_end_byte is the last highlighted byte (+ 1!), + hl_group is |:hl| group used for highlighting. + *E5403* *E5404* *E5405* *E5406* + Both hl_start_byte and hl_end_byte + 1 must point to the start + of the multibyte character (highlighting must not break + multibyte characters), hl_end_byte + 1 may be equal to the + input length. Start column must be in range [0, len(input)), + end column must be in range (hl_start_byte, len(input)], + sections must be ordered so that next hl_start_byte is greater + then or equal to previous hl_end_byte. + NOTE: This function must not be used in a startup file, for the versions that only run in GUI mode (e.g., the Win32 GUI). Note: When input() is called from within a mapping it will |