From: Michael D. Lowis Date: Thu, 23 Aug 2018 02:41:37 +0000 (-0400) Subject: select pasted text automatically X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=c58f90bd0a43ef7d74781f6430587f1b490bfb53;p=projs%2Ftide.git select pasted text automatically --- diff --git a/lib/job.c b/lib/job.c index 1ed6f90..7d8f57c 100644 --- a/lib/job.c +++ b/lib/job.c @@ -27,7 +27,6 @@ static void pipe_read(Job* job) { long nread = read(job->fd, buffer, sizeof(buffer)-1); if (nread <= 0) { job->readfn = NULL; - view_selprev(pipedata->dest); } else if (nread > 0) { buffer[nread] = '\0'; view_putstr(pipedata->dest, buffer); diff --git a/lib/view.c b/lib/view.c index 492dfda..cfe0c1a 100644 --- a/lib/view.c +++ b/lib/view.c @@ -314,6 +314,7 @@ void view_redo(View* view) { void view_putstr(View* view, char* str) { buf_puts(BUF, str); + view_selprev(view); } char* view_getstr(View* view) {