From: Michael D. Lowis Date: Mon, 25 Nov 2019 02:40:12 +0000 (-0500) Subject: fixed point handling with username and password inputs X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=3d912d0e4d85985f0ed36dcd66d64a203d3148fa;p=projs%2Ftide.git fixed point handling with username and password inputs --- diff --git a/src/lib/xpty.c b/src/lib/xpty.c index 922a8c0..ef3c049 100644 --- a/src/lib/xpty.c +++ b/src/lib/xpty.c @@ -100,14 +100,18 @@ static void putb(int byte) { char b = byte; write(Pty_Fd, &b, 1); - if (byte != '\n') + if (byte == '\n') + { + *((char*)(EditView->buffer.contents.gapstart-1)) = ' '; + EditView->buffer.point.beg = EditView->buffer.point.end; + } + else if ((tio.c_lflag & ECHO) != ECHO) { *((char*)(EditView->buffer.contents.gapstart-1)) = '*'; } else { - *((char*)(EditView->buffer.contents.gapstart-1)) = ' '; - EditView->buffer.point.beg = EditView->buffer.point.end; + read(Pty_Fd, &b, 1); } } else if (byte == '\n' && buf_inpoint(&(EditView->buffer), EditView->buffer.selection.end-1))