diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2014-05-28 10:47:25 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-05-28 10:47:58 -0400 |
commit | 3dddceedceebb73b93d399f2c56b0f1b5394c645 (patch) | |
tree | ed1d11dcde7c7eb64f9474ae1c8ef891757fd554 /src/nvim/getchar.c | |
parent | e4fe2dbd777a59a9a9b386d960eb9dddc459e84e (diff) | |
parent | 7e3681c32e4fd1e19c01ffe7286ea29aafb2efc4 (diff) | |
download | rneovim-3dddceedceebb73b93d399f2c56b0f1b5394c645.tar.gz rneovim-3dddceedceebb73b93d399f2c56b0f1b5394c645.tar.bz2 rneovim-3dddceedceebb73b93d399f2c56b0f1b5394c645.zip |
Merge #674 'Extract cursor.h from misc{1,2}.h and memline.h'
Diffstat (limited to 'src/nvim/getchar.c')
-rw-r--r-- | src/nvim/getchar.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c index 52322244e1..d215bb06e7 100644 --- a/src/nvim/getchar.c +++ b/src/nvim/getchar.c @@ -20,6 +20,7 @@ #include "nvim/vim.h" #include "nvim/getchar.h" #include "nvim/charset.h" +#include "nvim/cursor.h" #include "nvim/edit.h" #include "nvim/eval.h" #include "nvim/ex_docmd.h" @@ -2171,7 +2172,7 @@ static int vgetorpeek(int advance) * character -- webb */ col = vcol = curwin->w_wcol = 0; - ptr = ml_get_curline(); + ptr = get_cursor_line_ptr(); while (col < curwin->w_cursor.col) { if (!vim_iswhite(ptr[col])) curwin->w_wcol = vcol; @@ -2199,7 +2200,7 @@ static int vgetorpeek(int advance) if (has_mbyte && col > 0 && curwin->w_wcol > 0) { /* Correct when the cursor is on the right halve * of a double-wide character. */ - ptr = ml_get_curline(); + ptr = get_cursor_line_ptr(); col -= (*mb_head_off)(ptr, ptr + col); if ((*mb_ptr2cells)(ptr + col) > 1) --curwin->w_wcol; |