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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/textobject.c b/src/nvim/textobject.c
index 0cfbb50684..2d1fd8c699 100644
--- a/src/nvim/textobject.c
+++ b/src/nvim/textobject.c
@@ -213,7 +213,7 @@ bool findpar(bool *pincl, int dir, int count, int what, bool both)
curr++;
}
curwin->w_cursor.lnum = curr;
- if (curr == curbuf->b_ml.ml_line_count && what != '}') {
+ if (curr == curbuf->b_ml.ml_line_count && what != '}' && dir == FORWARD) {
char *line = ml_get(curr);
// Put the cursor on the last character in the last line and make the