X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=ldisc.c;h=0e864874efcb0b9908693d90bc67078d9bc4fab7;hb=d23c0972cd850c77871f9a314e0520d7023c8b62;hp=8f653a18f0ee23c74323eb1c83a249f13f87f820;hpb=4db5c2899f2b5c14d6bf72b39c4f71348ceabdd4;p=PuTTY.git diff --git a/ldisc.c b/ldisc.c index 8f653a18..0e864874 100644 --- a/ldisc.c +++ b/ldisc.c @@ -7,6 +7,7 @@ #include #include +#include #include "putty.h" #include "terminal.h" @@ -127,18 +128,20 @@ void ldisc_free(void *handle) sfree(ldisc); } +void ldisc_echoedit_update(void *handle) +{ + Ldisc ldisc = (Ldisc) handle; + frontend_echoedit_update(ldisc->frontend, ECHOING, EDITING); +} + void ldisc_send(void *handle, char *buf, int len, int interactive) { Ldisc ldisc = (Ldisc) handle; int keyflag = 0; - /* - * Called with len=0 when the options change. We must inform - * the front end in case it needs to know. - */ - if (len == 0) { - ldisc_update(ldisc->frontend, ECHOING, EDITING); - return; - } + + assert(ldisc->term); + assert(len); + /* * Notify the front end that something was pressed, in case * it's depending on finding out (e.g. keypress termination for @@ -146,7 +149,7 @@ void ldisc_send(void *handle, char *buf, int len, int interactive) */ frontend_keypress(ldisc->frontend); - if (interactive && ldisc->term) { + if (interactive) { /* * Interrupt a paste from the clipboard, if one was in * progress when the user pressed a key. This is easier than