Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
ZLE undo rewrite
- X-seq: zsh-workers 2746
- From: Zefram <zefram@xxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxxx (Z Shell workers mailing list)
- Subject: ZLE undo rewrite
- Date: Wed, 8 Jan 1997 10:10:50 +0000 (GMT)
-----BEGIN PGP SIGNED MESSAGE-----
This patch is a rewrite of ZLE's undo mechanism. The new mechanism
handles switches of history line correctly, always applying stored changes
to the history line they were originally made on. It also adds reverse
change information to the structure, making a redo command possible.
I also removed the arbitrary limit of 64 stored changes -- it is now
always possible to undo all changes back to the point that ZLE was
entered.
The way undo events are now added -- only being added if there has been
some change made from the last selected point in the undo history -- means
that there is no need to avoid adding an undo event after executing the
"undo" ZLE function. The nasty hack for vi-undo-change, which relied
on this behaviour in a way that is fundamentally incompatible with
allowing redoing, is removed, and the function implemented properly.
As a side effect, therefore, all need for the ZLE_UNDO flag is removed.
-zefram
begin 644 undo_patch.gz
M'XL("-H"TS("`W5N9&]?<&%T8V@`U1I_4]M&]F_G4RR].2K9%DBR,=@.N:8)
M,\V4D$Q".KVV24;(:ZQ#EG1:&0HIW_W>>[LKK6290'K7R3$#:-^^??M^O[<K
M=;M=]CP-=V_$8J?@OT<=;SS>WW6]77?`W(.).YSX;L?;.7CD.,X&Q`/F^A//
MG?B#1]WZ#X[98,\?]P=[@R$C$-+1H`,&(^<18]]=1,F,_\Z>G;XY=GYF*P"]
M2,*<+WE2!'%\S5;)+&7%@K,X$`6#_0NV3&?1/`J#(DJ3'5CPJ,>^BPJ^9#F?
MI3@H)$TUK--#(!%-^#HUL0/XR!61NXP<1'3"19"<<V:MDK,4`#:SOKLXFWU:
MW=H5#!>I;>O+#!E7I!6ERIN8[RR#!)4YVO7\77_$O/'$&TQ\'[3NN:;:#5Q#
M\>YXLN>V*GY_Y/;W1WN5VB6@5/IO\^^1P]_FKYGUX2/[\/,*?C^\LTT1#<$>
M;)"=T]>@1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