aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/edit.c
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2021-08-11 17:38:36 +0200
committerGitHub <noreply@github.com>2021-08-11 17:38:36 +0200
commit7d2233fad007a3dd42481f8ffc01e69b57a17f9e (patch)
treea539fc5a49b000086de4a0ab7c6fbd49e8de9ab8 /src/nvim/edit.c
parent2c60f7c99188e90739d83f3c131134b71cd37436 (diff)
parent28b5c73bf8b5cc92451a4030b4ffbbad6c56374b (diff)
downloadrneovim-7d2233fad007a3dd42481f8ffc01e69b57a17f9e.tar.gz
rneovim-7d2233fad007a3dd42481f8ffc01e69b57a17f9e.tar.bz2
rneovim-7d2233fad007a3dd42481f8ffc01e69b57a17f9e.zip
Merge pull request #15336 from bfredl/plines
refactor(plines): move "plines" (size of printed lines) family of function to own file
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r--src/nvim/edit.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c
index 2305faa20c..fec8da2c3c 100644
--- a/src/nvim/edit.c
+++ b/src/nvim/edit.c
@@ -41,6 +41,7 @@
#include "nvim/option.h"
#include "nvim/path.h"
#include "nvim/popupmnu.h"
+#include "nvim/plines.h"
#include "nvim/quickfix.h"
#include "nvim/regexp.h"
#include "nvim/screen.h"
@@ -7187,7 +7188,7 @@ static void replace_do_bs(int limit_col)
// Get the number of screen cells used by the character we are
// going to delete.
getvcol(curwin, &curwin->w_cursor, NULL, &start_vcol, NULL);
- orig_vcols = chartabsize(get_cursor_pos_ptr(), start_vcol);
+ orig_vcols = win_chartabsize(curwin, get_cursor_pos_ptr(), start_vcol);
}
(void)del_char_after_col(limit_col);
if (l_State & VREPLACE_FLAG) {
@@ -7201,8 +7202,8 @@ static void replace_do_bs(int limit_col)
p = get_cursor_pos_ptr();
ins_len = (int)STRLEN(p) - orig_len;
vcol = start_vcol;
- for (i = 0; i < ins_len; ++i) {
- vcol += chartabsize(p + i, vcol);
+ for (i = 0; i < ins_len; i++) {
+ vcol += win_chartabsize(curwin, p + i, vcol);
i += (*mb_ptr2len)(p) - 1;
}
vcol -= start_vcol;