From 137e8794bbba128cf57d29363ef82886623c1f3e Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Wed, 6 Jun 2012 21:26:22 -0400 Subject: [PATCH] clean up --- termite.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/termite.c b/termite.c index 46b723f..2a50ee1 100644 --- a/termite.c +++ b/termite.c @@ -1,7 +1,6 @@ #define _POSIX_C_SOURCE 200809L #include -#include #include #include @@ -45,14 +44,12 @@ static GtkTreeModel *create_completion_model(VteTerminal *vte) { glong end_row, end_col; vte_terminal_get_cursor_position(vte, &end_col, &end_row); - gchar *content = vte_terminal_get_text_range(vte, 0, 0, - end_row, - end_col, + gchar *content = vte_terminal_get_text_range(vte, 0, 0, end_row, end_col, NULL, NULL, NULL); if (!content) { - g_printerr("no content"); - exit(EXIT_FAILURE); + g_printerr("no content returned for completion"); + return GTK_TREE_MODEL(store); } char *s_ptr = content, *saveptr;