mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-11-01 18:30:55 +01:00
users/16932: implement $UNDO_CHANGE_NO and argument to undo widget
This commit is contained in:
parent
8bb9818cd4
commit
13a45d74eb
6 changed files with 59 additions and 4 deletions
|
|
@ -877,6 +877,12 @@ any predisplay string should be highlighted in bold.
|
|||
Note that the effect of tt(region_highlight) is not saved and disappears
|
||||
as soon as the line is accepted.
|
||||
)
|
||||
vindex(UNDO_CHANGE_NO)
|
||||
item(tt(UNDO_CHANGE_NO) (integer))
|
||||
A number representing the state of the undo history. The only use
|
||||
of this is passing as an argument to the tt(undo) widget in order to
|
||||
undo back to the recorded point. Read-only.
|
||||
)
|
||||
vindex(WIDGET)
|
||||
item(tt(WIDGET) (scalar))(
|
||||
The name of the widget currently being executed; read-only.
|
||||
|
|
@ -2164,7 +2170,10 @@ command is typed. By default it beeps.
|
|||
)
|
||||
tindex(undo)
|
||||
item(tt(undo) (^_ ^Xu ^X^U) (unbound) (unbound))(
|
||||
Incrementally undo the last text modification.
|
||||
Incrementally undo the last text modification. When called from a
|
||||
user-defined widget, takes an optional argument indicating a previous state
|
||||
of the undo history as returned by the tt(UNDO_CHANGE_NO) variable;
|
||||
modifications are undone until that state is reached.
|
||||
)
|
||||
tindex(redo)
|
||||
item(tt(redo))(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue