patch 8.0.0797: finished job in terminal window is not handled

Problem:    Finished job in terminal window is not handled.
Solution:   Add the scrollback buffer.  Use it to fill the buffer when the job
            has ended.
diff --git a/src/os_unix.c b/src/os_unix.c
index 8f51e68..5e744b6 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -412,6 +412,9 @@
 
 #ifdef MESSAGE_QUEUE
 	parse_queued_messages();
+	/* If input was put directly in typeahead buffer bail out here. */
+	if (typebuf_changed(tb_change_cnt))
+	    return 0;
 #endif
 	if (wtime < 0 && did_start_blocking)
 	    /* blocking and already waited for p_ut */