Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH] Re: Bug: Callback to widget set with `zle -Fw <widget>` shouldn't change $LASTWIDGET



Is this good enough, or is there a need to consider that the handler
might delete the previous last widget?  What does/should happen in
that case (or when a widget deletes itself, for that matter)?

diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c
index 686c6f5b4..cfa0a739d 100644
--- a/Src/Zle/zle_main.c
+++ b/Src/Zle/zle_main.c
@@ -737,6 +737,7 @@ raw_getbyte(long do_keytmout, char *cptr, int full)
             ) {
             /* Handle the fd. */
             char *fdbuf;
+            Thingy save_lbindk = lbindk;
             {
                 char buf[BDIGBUFSIZE];
                 convbase(buf, lwatch_fd->fd, 10);
@@ -779,6 +780,7 @@ raw_getbyte(long do_keytmout, char *cptr, int full)
                  */
                 errtry = 1;
             }
+            lbindk = save_lbindk;
             }
         }
         /* Function may have invalidated the display. */




Messages sorted by: Reverse Date, Date, Thread, Author