diff options
author | Jun T <takimoto-j@kba.biglobe.ne.jp> | 2014-03-13 21:31:59 +0900 |
---|---|---|
committer | Peter Stephenson <pws@zsh.org> | 2014-03-13 16:29:19 +0000 |
commit | ba44ba6e6fa99582c681cfc69ce4f77838af2bb6 (patch) | |
tree | 8bb6b60240ba07eedaa86e646ef9de975fb4f51d /Src/Zle | |
parent | 38be9fe84a884d44c30bbcea0595799882aff898 (diff) | |
download | zsh-ba44ba6e6fa99582c681cfc69ce4f77838af2bb6.tar.gz zsh-ba44ba6e6fa99582c681cfc69ce4f77838af2bb6.tar.xz zsh-ba44ba6e6fa99582c681cfc69ce4f77838af2bb6.zip |
32480: Fix crash in vi mode with too few previous changes
Diffstat (limited to 'Src/Zle')
-rw-r--r-- | Src/Zle/zle_vi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/Zle/zle_vi.c b/Src/Zle/zle_vi.c index 994b44fe3..9e39143d0 100644 --- a/Src/Zle/zle_vi.c +++ b/Src/Zle/zle_vi.c @@ -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; } |