neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit d404d68c929a272eb7ccbc3cc370673e005e2a4b
parent b5dd562e08727877d973718e7a75804cace259dd
Author: zeertzjq <zeertzjq@outlook.com>
Date:   Tue, 31 May 2022 07:06:34 +0800

docs: clarify that nvim_strwidth counts control characters as one cell (#18802)


Diffstat:
Mruntime/doc/api.txt | 2+-
Msrc/nvim/api/vim.c | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt @@ -1706,7 +1706,7 @@ nvim_set_vvar({name}, {value}) *nvim_set_vvar()* nvim_strwidth({text}) *nvim_strwidth()* Calculates the number of display cells occupied by `text`. - <Tab> counts as one cell. + Control characters including <Tab> count as one cell. Parameters: ~ {text} Some text diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c @@ -480,7 +480,7 @@ Object nvim_notify(String msg, Integer log_level, Dictionary opts, Error *err) } /// Calculates the number of display cells occupied by `text`. -/// <Tab> counts as one cell. +/// Control characters including <Tab> count as one cell. /// /// @param text Some text /// @param[out] err Error details, if any