File tree Expand file tree Collapse file tree 3 files changed +13
-3
lines changed
Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -2277,7 +2277,11 @@ do_one_cmd(
22772277 if (* ea .cmd == ';' )
22782278 {
22792279 if (!ea .skip )
2280+ {
22802281 curwin -> w_cursor .lnum = ea .line2 ;
2282+ /* don't leave the cursor on an illegal line */
2283+ check_cursor_lnum ();
2284+ }
22812285 }
22822286 else if (* ea .cmd != ',' )
22832287 break ;
@@ -2293,9 +2297,6 @@ do_one_cmd(
22932297 ea .addr_count = 0 ;
22942298 }
22952299
2296- /* Don't leave the cursor on an illegal line (caused by ';') */
2297- check_cursor_lnum ();
2298-
22992300/*
23002301 * 5. Parse the command.
23012302 */
Original file line number Diff line number Diff line change @@ -234,3 +234,10 @@ func Test_remove_char_in_cmdline()
234234 call feedkeys (" :abc def\<S-Left>\<C-U>\<C-B> \" \<CR> " , ' tx' )
235235 call assert_equal (' "def' , @: )
236236endfunc
237+
238+ func Test_illegal_address ()
239+ new
240+ 2 ;'(
241+ 2 ;')
242+ quit
243+ endfunc
Original file line number Diff line number Diff line change @@ -764,6 +764,8 @@ static char *(features[]) =
764764
765765static int included_patches [] =
766766{ /* Add new patch number below this line */
767+ /**/
768+ 133 ,
767769/**/
768770 132 ,
769771/**/
You can’t perform that action at this time.
0 commit comments