diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-09-17 20:29:18 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-17 20:29:18 +0800 |
commit | 71530cc972576e6656431b6d000aec9b69a0997e (patch) | |
tree | 0771f6a3c7126832f01fac11b334b28a3604e3c8 /runtime | |
parent | 677df72e4032d819a3e49a41f015bea7457271a4 (diff) | |
download | rneovim-71530cc972576e6656431b6d000aec9b69a0997e.tar.gz rneovim-71530cc972576e6656431b6d000aec9b69a0997e.tar.bz2 rneovim-71530cc972576e6656431b6d000aec9b69a0997e.zip |
feat(folds): support virtual text format for 'foldtext' (#25209)
Co-authored-by: Lewis Russell <lewis6991@gmail.com>
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/fold.txt | 6 | ||||
-rw-r--r-- | runtime/doc/news.txt | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/runtime/doc/fold.txt b/runtime/doc/fold.txt index 24d7605e4a..8f7393f5e3 100644 --- a/runtime/doc/fold.txt +++ b/runtime/doc/fold.txt @@ -520,8 +520,10 @@ expression. It can use these special Vim variables: foldlevel. v:foldlevel the foldlevel of the fold -In the result a TAB is replaced with a space and unprintable characters are -made into printable characters. +If the result is a |List|, it is parsed and drawn like "overlay" virtual text +(see |nvim_buf_set_extmark()|), otherwise the result is converted to a string +where a TAB is replaced with a space and unprintable characters are made into +printable characters. The resulting line is truncated to fit in the window, it never wraps. When there is room after the text, it is filled with the character specified diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 0162a99619..7c971097fb 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -89,6 +89,8 @@ The following new APIs and features were added. • Added inline virtual text support to |nvim_buf_set_extmark()|. +• 'foldtext' now supports virtual text format. |fold-foldtext| + • The terminal buffer now supports reflow (wrapped lines adapt when the buffer is resized horizontally). Note: Lines that are not visible and kept in |'scrollback'| are not reflown. |