]> git.mdlowis.com Git - projs/tide.git/commitdiff
select pasted text automatically
authorMichael D. Lowis <mike@mdlowis.com>
Thu, 23 Aug 2018 02:41:37 +0000 (22:41 -0400)
committerMichael D. Lowis <mike@mdlowis.com>
Thu, 23 Aug 2018 02:41:37 +0000 (22:41 -0400)
lib/job.c
lib/view.c

index 1ed6f902c9b41a0a9a49905d0135807e8700a907..7d8f57c0309681bd1f0c2a5fecf390cf5fd0362f 100644 (file)
--- 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);
index 492dfdaa815fae53bde786d102121ae51cd8a93f..cfe0c1a21c14fad12e825a451900ddc6a0232228 100644 (file)
@@ -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) {