diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-03-14 13:35:04 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-14 13:35:04 +0800 |
commit | 274e414c94a74c7f90952327f69a8a1d65e9f00a (patch) | |
tree | 132b06712a25cc34f93883a9ea63c26b4ce4bf45 /src/nvim/textobject.c | |
parent | 3502aa63f0f4ea8d8982aea81a819424e71029bc (diff) | |
parent | 61b48e91b941258e6945e3eafadc777dccef5b75 (diff) | |
download | rneovim-274e414c94a74c7f90952327f69a8a1d65e9f00a.tar.gz rneovim-274e414c94a74c7f90952327f69a8a1d65e9f00a.tar.bz2 rneovim-274e414c94a74c7f90952327f69a8a1d65e9f00a.zip |
Merge pull request #27850 from zeertzjq/vim-9.1.0172
vim-patch:9.1.{0172,0177}: more code can use ml_get_buf_len()
Diffstat (limited to 'src/nvim/textobject.c')
-rw-r--r-- | src/nvim/textobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/textobject.c b/src/nvim/textobject.c index 8ac63aad16..3c81a840ea 100644 --- a/src/nvim/textobject.c +++ b/src/nvim/textobject.c @@ -218,7 +218,7 @@ bool findpar(bool *pincl, int dir, int count, int what, bool both) // Put the cursor on the last character in the last line and make the // motion inclusive. - if ((curwin->w_cursor.col = (colnr_T)strlen(line)) != 0) { + if ((curwin->w_cursor.col = ml_get_len(curr)) != 0) { curwin->w_cursor.col--; curwin->w_cursor.col -= utf_head_off(line, line + curwin->w_cursor.col); *pincl = true; |