diff options
author | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-09-16 20:28:05 -0400 |
---|---|---|
committer | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-09-16 20:46:06 -0400 |
commit | 91352b36b70ef20a4d1b94c4160129bf5f0d6b60 (patch) | |
tree | b962dbc4ea8c42dec2e8fc7a7888c58f47cda33f /src/nvim/misc1.c | |
parent | 9f1401e25cfcd3db1ccb4471599e13c5e5c3e5d8 (diff) | |
download | rneovim-91352b36b70ef20a4d1b94c4160129bf5f0d6b60.tar.gz rneovim-91352b36b70ef20a4d1b94c4160129bf5f0d6b60.tar.bz2 rneovim-91352b36b70ef20a4d1b94c4160129bf5f0d6b60.zip |
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)
https://github.com/vim/vim/commit/8ada6aa9298b4764d9ca0024dd21b17e815595ce
Diffstat (limited to 'src/nvim/misc1.c')
-rw-r--r-- | src/nvim/misc1.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/misc1.c b/src/nvim/misc1.c index ad0a8d409f..99dc29f119 100644 --- a/src/nvim/misc1.c +++ b/src/nvim/misc1.c @@ -1752,6 +1752,10 @@ del_lines ( int gchar_pos(pos_T *pos) { + // When searching columns is sometimes put at the end of a line. + if (pos->col == MAXCOL) { + return NUL; + } return utf_ptr2char(ml_get_pos(pos)); } |