about summary refs log tree commit diff
path: root/Src/Zle/zle_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Zle/zle_main.c')
-rw-r--r--Src/Zle/zle_main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c
index cfa0a739d..1afb1bf58 100644
--- a/Src/Zle/zle_main.c
+++ b/Src/Zle/zle_main.c
@@ -737,7 +737,7 @@ raw_getbyte(long do_keytmout, char *cptr, int full)
 			) {
 			/* Handle the fd. */
 			char *fdbuf;
-			Thingy save_lbindk = lbindk;
+			Thingy save_lbindk = refthingy(lbindk);
 			{
 			    char buf[BDIGBUFSIZE];
 			    convbase(buf, lwatch_fd->fd, 10);
@@ -780,6 +780,7 @@ raw_getbyte(long do_keytmout, char *cptr, int full)
 			     */
 			    errtry = 1;
 			}
+			unrefthingy(lbindk);
 			lbindk = save_lbindk;
 		    }
 		}
@@ -2071,9 +2072,9 @@ trashzle(void)
 	trashedzle = 1;
 	zrefresh();
 	showinglist = sl;
-	moveto(nlnct, 0);
 	treplaceattrs(prompt_attr);
 	applytextattributes(0);
+	moveto(nlnct, 0);
 	if (clearflag && tccan(TCCLEAREOD)) {
 	    tcout(TCCLEAREOD);
 	    clearflag = listshown = 0;