about summary refs log tree commit diff
path: root/Src/Zle/zle_utils.c
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-06-27 05:33:04 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-06-27 05:33:04 +0000
commit346825df86466cf151be61b9429ef2c1734e66ea (patch)
treebd3e1ccd947b47f974c62b4113c5276416de2c9f /Src/Zle/zle_utils.c
parenta2159285e80508bb682d90a71270fbddada8bd05 (diff)
downloadzsh-346825df86466cf151be61b9429ef2c1734e66ea.tar.gz
zsh-346825df86466cf151be61b9429ef2c1734e66ea.tar.xz
zsh-346825df86466cf151be61b9429ef2c1734e66ea.zip
zsh-3.1.5-pws-24 zsh-3.1.5-pws-24
Diffstat (limited to 'Src/Zle/zle_utils.c')
-rw-r--r--Src/Zle/zle_utils.c45
1 files changed, 18 insertions, 27 deletions
diff --git a/Src/Zle/zle_utils.c b/Src/Zle/zle_utils.c
index 8524fd21e..bd2f39a06 100644
--- a/Src/Zle/zle_utils.c
+++ b/Src/Zle/zle_utils.c
@@ -409,19 +409,11 @@ showmsg(char const *msg)
 /* handle the error flag */
 
 /**/
-void
-feep(void)
-{
-    feepflag = 1;
-}
-
-/**/
-void
-handlefeep(void)
+int
+handlefeep(char **args)
 {
-    if(feepflag)
-	zbeep();
-    feepflag = 0;
+    zbeep();
+    return 0;
 }
 
 /***************/
@@ -554,18 +546,17 @@ setlastline(void)
 /* move backwards through the change list */
 
 /**/
-void
-undo(void)
+int
+undo(char **args)
 {
     handleundo();
     do {
-	if(!curchange->prev) {
-	    feep();
-	    return;
-	}
+	if(!curchange->prev)
+	    return 1;
 	unapplychange(curchange = curchange->prev);
     } while(curchange->flags & CH_PREV);
     setlastline();
+    return 0;
 }
 
 /**/
@@ -592,19 +583,18 @@ unapplychange(struct change *ch)
 /* move forwards through the change list */
 
 /**/
-void
-redo(void)
+int
+redo(char **args)
 {
     handleundo();
     do {
-	if(!curchange->next) {
-	    feep();
-	    return;
-	}
+	if(!curchange->next)
+	    return 1;
 	applychange(curchange);
 	curchange = curchange->next;
     } while(curchange->prev->flags & CH_NEXT);
     setlastline();
+    return 0;
 }
 
 /**/
@@ -631,8 +621,8 @@ applychange(struct change *ch)
 /* vi undo: toggle between the end of the undo list and the preceding point */
 
 /**/
-void
-viundochange(void)
+int
+viundochange(char **args)
 {
     handleundo();
     if(curchange->next) {
@@ -641,6 +631,7 @@ viundochange(void)
 	    curchange = curchange->next;
 	} while(curchange->next);
 	setlastline();
+	return 0;
     } else
-	undo();
+	return undo(args);
 }