1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-04 22:51:42 +02:00

32480: Fix crash in vi mode with too few previous changes

This commit is contained in:
Jun T 2014-03-13 21:31:59 +09:00 committed by Peter Stephenson
parent 38be9fe84a
commit ba44ba6e6f
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2014-03-13 Peter Stephenson <p.stephenson@samsung.com>
* Jun T: 32480: Src/Zle/zle_vi.c: fix crash in vi mode when too
few previous changes.
2014-03-09 Barton E. Schaefer <schaefer@zsh.org>
* 32468: Src/Modules/zutil.c: save/restore match/mbegin/mend

View file

@ -401,7 +401,7 @@ vichange(UNUSED(char **args))
forekill(c2 - zlecs, CUT_RAW);
selectkeymap("main", 1);
viinsbegin = zlecs;
vistartchange = curchange->prev->changeno;
vistartchange = (curchange && curchange->prev) ? curchange->prev->changeno : 0;
}
return ret;
}