mirror of
https://github.com/neovim/neovim.git
synced 2025-09-18 17:28:23 +00:00
vim-patch:8.2.0648: semicolon search does not work in first line
Problem: Semicolon search does not work in first line.
Solution: Allow the cursor to be in line zero. (Christian Brabandt,
closes vim/vim#5996)
0e71704b77
This commit is contained in:
@@ -2476,8 +2476,11 @@ int parse_cmd_address(exarg_T *eap, char_u **errormsg)
|
||||
if (*eap->cmd == ';') {
|
||||
if (!eap->skip) {
|
||||
curwin->w_cursor.lnum = eap->line2;
|
||||
// don't leave the cursor on an illegal line or column
|
||||
check_cursor();
|
||||
// Don't leave the cursor on an illegal line or column, but do
|
||||
// accept zero as address, so 0;/PATTERN/ works correctly.
|
||||
if (eap->line2 > 0) {
|
||||
check_cursor();
|
||||
}
|
||||
}
|
||||
} else if (*eap->cmd != ',') {
|
||||
break;
|
||||
|
Reference in New Issue
Block a user