Empty lines are no longer stored in the input history
[rodin/chimara.git] / libchimara / input.c
index d0a037a8856c2a719903d8e2f00cd1aa873159e1..c35564593ec0a5d6990cb5d34901cb422f0a1ea7 100644 (file)
@@ -562,7 +562,9 @@ finish_text_buffer_line_input(winid_t win, gboolean emit_signal)
                g_free(win->history->data);
                win->history = g_list_delete_link(win->history, win->history);
        }
-       win->history = g_list_prepend(win->history, g_strdup(inserted_text));   
+       if(*inserted_text != 0)
+               win->history = g_list_prepend(win->history, g_strdup(inserted_text));   
+       
        win->history_pos = NULL;
        
        g_free(inserted_text);