#endif /* FEAT_TEXTOBJ */
/*
- * Check if the pattern is one character long or zero-width.
+ * Check if the pattern is zero-width.
* If move is TRUE, check from the beginning of the buffer, else from position
* "cur".
* "direction" is FORWARD or BACKWARD.
// put cursor on last character of match
curwin->w_cursor = end_pos;
- if (LT_POS(VIsual, end_pos))
+ if (LT_POS(VIsual, end_pos) && forward)
dec_cursor();
else if (VIsual_active && LT_POS(curwin->w_cursor, VIsual))
curwin->w_cursor = pos; // put the cursor on the start of the match
norm! gg0f7vhhhhgnd
call assert_equal(['12348'], getline(1,'$'))
sil! %d _
+ call setline('.', ['12345678'])
+ let @/ = '5'
+ norm! gg0f2vf7gNd
+ call assert_equal(['1678'], getline(1,'$'))
+ sil! %d _
set wrapscan&vim
endfu