Problem: "2;'(" causes ml_get errors in an empty buffer. (Dominique Pelle)
Solution: Check the cursor line earlier.
if (*ea.cmd == ';')
{
if (!ea.skip)
+ {
curwin->w_cursor.lnum = ea.line2;
+ /* don't leave the cursor on an illegal line */
+ check_cursor_lnum();
+ }
}
else if (*ea.cmd != ',')
break;
ea.addr_count = 0;
}
- /* Don't leave the cursor on an illegal line (caused by ';') */
- check_cursor_lnum();
-
/*
* 5. Parse the command.
*/
call feedkeys(":abc def\<S-Left>\<C-U>\<C-B>\"\<CR>", 'tx')
call assert_equal('"def', @:)
endfunc
+
+func Test_illegal_address()
+ new
+ 2;'(
+ 2;')
+ quit
+endfunc
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 133,
/**/
132,
/**/