mirror of
https://github.com/neovim/neovim.git
synced 2025-10-04 00:46:30 +00:00
vim-patch:7.4.253
Problem: Crash when using cpp syntax file with pattern using external match. (Havard Garnes) Solution: Discard match when end column is before start column. https://code.google.com/p/vim/source/detail?r=4901a36479f200b2e6700ad91c26911d92deb886
This commit is contained in:

committed by
Thiago de Arruda

parent
cb0adf60de
commit
b94239e03c
@@ -3665,11 +3665,14 @@ static long regtry(bt_regprog_T *prog, colnr_T col)
|
||||
if (REG_MULTI) {
|
||||
/* Only accept single line matches. */
|
||||
if (reg_startzpos[i].lnum >= 0
|
||||
&& reg_endzpos[i].lnum == reg_startzpos[i].lnum)
|
||||
&& reg_endzpos[i].lnum == reg_startzpos[i].lnum
|
||||
&& reg_endzpos[i].col >= reg_startzpos[i].col) {
|
||||
re_extmatch_out->matches[i] =
|
||||
vim_strnsave(reg_getline(reg_startzpos[i].lnum)
|
||||
+ reg_startzpos[i].col,
|
||||
reg_endzpos[i].col - reg_startzpos[i].col);
|
||||
+ reg_startzpos[i].col,
|
||||
reg_endzpos[i].col
|
||||
- reg_startzpos[i].col);
|
||||
}
|
||||
} else {
|
||||
if (reg_startzp[i] != NULL && reg_endzp[i] != NULL)
|
||||
re_extmatch_out->matches[i] =
|
||||
|
Reference in New Issue
Block a user