mirror of
https://github.com/neovim/neovim.git
synced 2025-09-20 02:08:17 +00:00
vim-patch:8.0.1416: crash when searching for a sentence
Problem: Crash when searching for a sentence.
Solution: Return NUL when getting character at MAXCOL. (closes vim/vim#2468)
8ada6aa929
This commit is contained in:
@@ -3665,13 +3665,14 @@ static linenr_T get_address(exarg_T *eap,
|
||||
if (lnum != MAXLNUM)
|
||||
curwin->w_cursor.lnum = lnum;
|
||||
/*
|
||||
* Start a forward search at the end of the line.
|
||||
* Start a forward search at the end of the line (unless
|
||||
* before the first line).
|
||||
* Start a backward search at the start of the line.
|
||||
* This makes sure we never match in the current
|
||||
* line, and can match anywhere in the
|
||||
* next/previous line.
|
||||
*/
|
||||
if (c == '/')
|
||||
if (c == '/' && curwin->w_cursor.lnum > 0)
|
||||
curwin->w_cursor.col = MAXCOL;
|
||||
else
|
||||
curwin->w_cursor.col = 0;
|
||||
|
Reference in New Issue
Block a user