From 13a45d74eb246894516aa9315622cf99d7f27697 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 29 Mar 2012 20:31:33 +0000 Subject: users/16932: implement $UNDO_CHANGE_NO and argument to undo widget --- Doc/Zsh/zle.yo | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'Doc') diff --git a/Doc/Zsh/zle.yo b/Doc/Zsh/zle.yo index d3624b1ce..8dc46ca28 100644 --- a/Doc/Zsh/zle.yo +++ b/Doc/Zsh/zle.yo @@ -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))( -- cgit 1.4.1