summaryrefslogtreecommitdiff
path: root/src/fe-text/gui-printtext.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fe-text/gui-printtext.c')
-rw-r--r--src/fe-text/gui-printtext.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/fe-text/gui-printtext.c b/src/fe-text/gui-printtext.c
index 13d8c233..83a36f14 100644
--- a/src/fe-text/gui-printtext.c
+++ b/src/fe-text/gui-printtext.c
@@ -120,12 +120,19 @@ void gui_printtext_internal(int xpos, int ypos, const char *str)
next_xpos = next_ypos = -1;
}
+static void view_add_eol(TEXT_BUFFER_VIEW_REC *view, LINE_REC **line);
+
void gui_printtext_after_time(TEXT_DEST_REC *dest, LINE_REC *prev, const char *str, time_t time)
{
GUI_WINDOW_REC *gui;
gui = WINDOW_GUI(dest->window);
+ if (prev == NULL && !gui->view->buffer->last_eol) {
+ /* we have an unfinished line in the buffer still */
+ view_add_eol(gui->view, &gui->insert_after);
+ }
+
gui->use_insert_after = TRUE;
gui->insert_after = prev;
gui->insert_after_time = time;