diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2006-10-30 14:13:36 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2006-10-30 14:13:36 +0000 |
commit | 006229c32e692a5aacbef1f6237b6b076ce1816f (patch) | |
tree | 01c150162e5d553555df29c6d267b6a0be504b27 /Src/Zle/zle_utils.c | |
parent | 9986ebfd3334ac58f81259d2ec276379c4c020ec (diff) | |
download | zsh-006229c32e692a5aacbef1f6237b6b076ce1816f.tar.gz zsh-006229c32e692a5aacbef1f6237b6b076ce1816f.tar.xz zsh-006229c32e692a5aacbef1f6237b6b076ce1816f.zip |
22924: a couple more metafy_line()/unmetafy_line() problems
Diffstat (limited to 'Src/Zle/zle_utils.c')
-rw-r--r-- | Src/Zle/zle_utils.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/Src/Zle/zle_utils.c b/Src/Zle/zle_utils.c index 67c7379f5..9b769b5a0 100644 --- a/Src/Zle/zle_utils.c +++ b/Src/Zle/zle_utils.c @@ -943,25 +943,25 @@ handleundo(void) remetafy = 0; mkundoent(); - if(!nextchanges) - return; - setlastline(); - if(curchange->next) { - freechanges(curchange->next); - curchange->next = NULL; - free(curchange->del); - free(curchange->ins); - curchange->del = curchange->ins = NULL; - curchange->dell = curchange->insl = 0; + if(nextchanges) { + setlastline(); + if(curchange->next) { + freechanges(curchange->next); + curchange->next = NULL; + free(curchange->del); + free(curchange->ins); + curchange->del = curchange->ins = NULL; + curchange->dell = curchange->insl = 0; + } + nextchanges->prev = curchange->prev; + if(curchange->prev) + curchange->prev->next = nextchanges; + else + changes = nextchanges; + curchange->prev = endnextchanges; + endnextchanges->next = curchange; + nextchanges = endnextchanges = NULL; } - nextchanges->prev = curchange->prev; - if(curchange->prev) - curchange->prev->next = nextchanges; - else - changes = nextchanges; - curchange->prev = endnextchanges; - endnextchanges->next = curchange; - nextchanges = endnextchanges = NULL; if (remetafy) metafy_line(); |