aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/textobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/textobject.c')
-rw-r--r--src/nvim/textobject.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/textobject.c b/src/nvim/textobject.c
index d9c2b3b111..8ac63aad16 100644
--- a/src/nvim/textobject.c
+++ b/src/nvim/textobject.c
@@ -187,7 +187,7 @@ bool findpar(bool *pincl, int dir, int count, int what, bool both)
// skip folded lines
fold_skipped = false;
- if (first && hasFolding(curr, &fold_first, &fold_last)) {
+ if (first && hasFolding(curwin, curr, &fold_first, &fold_last)) {
curr = ((dir > 0) ? fold_last : fold_first) + dir;
fold_skipped = true;
}
@@ -318,8 +318,8 @@ int fwd_word(int count, bool bigword, bool eol)
while (--count >= 0) {
// When inside a range of folded lines, move to the last char of the
// last line.
- if (hasFolding(curwin->w_cursor.lnum, NULL, &curwin->w_cursor.lnum)) {
- coladvance(MAXCOL);
+ if (hasFolding(curwin, curwin->w_cursor.lnum, NULL, &curwin->w_cursor.lnum)) {
+ coladvance(curwin, MAXCOL);
}
int sclass = cls(); // starting class
@@ -374,7 +374,7 @@ int bck_word(int count, bool bigword, bool stop)
while (--count >= 0) {
// When inside a range of folded lines, move to the first char of the
// first line.
- if (hasFolding(curwin->w_cursor.lnum, &curwin->w_cursor.lnum, NULL)) {
+ if (hasFolding(curwin, curwin->w_cursor.lnum, &curwin->w_cursor.lnum, NULL)) {
curwin->w_cursor.col = 0;
}
sclass = cls();
@@ -431,8 +431,8 @@ int end_word(int count, bool bigword, bool stop, bool empty)
while (--count >= 0) {
// When inside a range of folded lines, move to the last char of the
// last line.
- if (hasFolding(curwin->w_cursor.lnum, NULL, &curwin->w_cursor.lnum)) {
- coladvance(MAXCOL);
+ if (hasFolding(curwin, curwin->w_cursor.lnum, NULL, &curwin->w_cursor.lnum)) {
+ coladvance(curwin, MAXCOL);
}
sclass = cls();
if (inc_cursor() == -1) {