diff options
author | Luuk van Baal <luukvbaal@gmail.com> | 2023-04-06 03:33:57 +0200 |
---|---|---|
committer | Luuk van Baal <luukvbaal@gmail.com> | 2023-04-07 03:27:44 +0200 |
commit | 25dfed6e0148771cdb659df8c616df3860583c47 (patch) | |
tree | e7e7e71e9c8cdc797d792e30f93a6ab3d2099da4 /runtime | |
parent | fd32a987520cb132455d61301467182cb58cddf2 (diff) | |
download | rneovim-25dfed6e0148771cdb659df8c616df3860583c47.tar.gz rneovim-25dfed6e0148771cdb659df8c616df3860583c47.tar.bz2 rneovim-25dfed6e0148771cdb659df8c616df3860583c47.zip |
feat(api): set statuscolumn line number in nvim_eval_statusline()
Having the user set `v:lnum` before calling `nvim_eval_statusline()` is
unnecesarily fragile. Redraws inbetween setting `v:lnum` and the
`nvim_eval_statusline()` call will overwrite `v:lnum`.
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/api.txt | 4 | ||||
-rw-r--r-- | runtime/doc/news.txt | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index 52c3f7fa97..09d260e0cd 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -773,8 +773,8 @@ nvim_eval_statusline({str}, {*opts}) *nvim_eval_statusline()* • use_tabline: (boolean) Evaluate tabline instead of statusline. When true, {winid} is ignored. Mutually exclusive with {use_winbar}. - • use_statuscol: (boolean) Evaluate statuscolumn instead of - statusline. + • use_statuscol_lnum: (number) Evaluate statuscolumn for this + line number instead of statusline. Return: ~ Dictionary containing statusline information, with these keys: diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 98f3f3f398..12dc4674af 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -74,7 +74,7 @@ NEW FEATURES *news-features* The following new APIs or features were added. • |nvim_eval_statusline()| supports evaluating the |'statuscolumn'| through a - new `opts` field: `use_statuscol`. + new `opts` field: `use_statuscol_lnum`. • |nvim_buf_get_extmarks()| now accepts a -1 `ns_id` to request extmarks from all namespaces and adds the namespace id to the details array. |