mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-28 17:10:59 +01:00
38540: fix undo problem by not moving the current change when only undoing a history line change
This commit is contained in:
parent
8cf68f05ab
commit
3fdf1f16e3
2 changed files with 13 additions and 3 deletions
|
|
@ -1589,9 +1589,14 @@ undo(char **args)
|
|||
break;
|
||||
if (prev->changeno <= undo_limitno && !*args)
|
||||
return 1;
|
||||
if (!unapplychange(prev) && last_change >= 0)
|
||||
unapplychange(prev);
|
||||
curchange = prev;
|
||||
if (!unapplychange(prev)) {
|
||||
if (last_change >= 0) {
|
||||
unapplychange(prev);
|
||||
curchange = prev;
|
||||
}
|
||||
} else {
|
||||
curchange = prev;
|
||||
}
|
||||
} while (last_change >= (zlong)0 || (curchange->flags & CH_PREV));
|
||||
setlastline();
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue