aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2014-05-28 10:47:25 -0400
committerJustin M. Keyes <justinkz@gmail.com>2014-05-28 10:47:58 -0400
commit3dddceedceebb73b93d399f2c56b0f1b5394c645 (patch)
treeed1d11dcde7c7eb64f9474ae1c8ef891757fd554 /src/nvim/eval.c
parente4fe2dbd777a59a9a9b386d960eb9dddc459e84e (diff)
parent7e3681c32e4fd1e19c01ffe7286ea29aafb2efc4 (diff)
downloadrneovim-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/eval.c')
-rw-r--r--src/nvim/eval.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index 83bbd9a24c..95fb6ed732 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -16,6 +16,7 @@
#include "nvim/eval.h"
#include "nvim/buffer.h"
#include "nvim/charset.h"
+#include "nvim/cursor.h"
#include "nvim/diff.h"
#include "nvim/edit.h"
#include "nvim/ex_cmds.h"
@@ -8035,7 +8036,7 @@ static void f_col(typval_T *argvars, typval_T *rettv)
/* col(".") when the cursor is on the NUL at the end of the line
* because of "coladd" can be seen as an extra column. */
if (virtual_active() && fp == &curwin->w_cursor) {
- char_u *p = ml_get_cursor();
+ char_u *p = get_cursor_pos_ptr();
if (curwin->w_cursor.coladd >= (colnr_T)chartabsize(p,
curwin->w_virtcol - curwin->w_cursor.coladd)) {
@@ -13831,7 +13832,7 @@ static void f_spellbadword(typval_T *argvars, typval_T *rettv)
/* Find the start and length of the badly spelled word. */
len = spell_move_to(curwin, FORWARD, TRUE, TRUE, &attr);
if (len != 0)
- word = ml_get_cursor();
+ word = get_cursor_pos_ptr();
} else if (curwin->w_p_spell && *curbuf->b_s.b_p_spl != NUL) {
char_u *str = get_tv_string_chk(&argvars[0]);
int capcol = -1;
@@ -15392,7 +15393,7 @@ var2fpos (
pos.col = 0;
} else {
pos.lnum = curwin->w_cursor.lnum;
- pos.col = (colnr_T)STRLEN(ml_get_curline());
+ pos.col = (colnr_T)STRLEN(get_cursor_line_ptr());
}
return &pos;
}