File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4677,7 +4677,7 @@ current_quote(
46774677#endif /* FEAT_TEXTOBJ */
46784678
46794679/*
4680- * Check if the pattern is one character long or zero-width.
4680+ * Check if the pattern is zero-width.
46814681 * If move is TRUE, check from the beginning of the buffer, else from position
46824682 * "cur".
46834683 * "direction" is FORWARD or BACKWARD.
@@ -4851,7 +4851,7 @@ current_search(
48514851
48524852 // put cursor on last character of match
48534853 curwin -> w_cursor = end_pos ;
4854- if (LT_POS (VIsual , end_pos ))
4854+ if (LT_POS (VIsual , end_pos ) && forward )
48554855 dec_cursor ();
48564856 else if (VIsual_active && LT_POS (curwin -> w_cursor , VIsual ))
48574857 curwin -> w_cursor = pos ; // put the cursor on the start of the match
Original file line number Diff line number Diff line change @@ -148,6 +148,11 @@ func Test_gn_command()
148148 norm! gg0f7vhhhhgnd
149149 call assert_equal ([' 12348' ], getline (1 ,' $' ))
150150 sil ! % d _
151+ call setline (' .' , [' 12345678' ])
152+ let @/ = ' 5'
153+ norm! gg0f2vf7gNd
154+ call assert_equal ([' 1678' ], getline (1 ,' $' ))
155+ sil ! % d _
151156
152157 set wrapscan &vim
153158endfu
Original file line number Diff line number Diff line change @@ -741,6 +741,8 @@ static char *(features[]) =
741741
742742static int included_patches [] =
743743{ /* Add new patch number below this line */
744+ /**/
745+ 2218 ,
744746/**/
745747 2217 ,
746748/**/
You can’t perform that action at this time.
0 commit comments