aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/textadept.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/textadept.c b/src/textadept.c
index 4384a78c..50c1459b 100644
--- a/src/textadept.c
+++ b/src/textadept.c
@@ -270,7 +270,7 @@ static void find_add_to_history(const char *text, ListStore *store) {
gtk_list_store_set(store, &iter, 0, text, -1);
g_free(first_item);
int count = 1;
- while (gtk_tree_model_iter_next(GTK_TREE_MODEL(store), &iter))
+ while (iter.stamp && gtk_tree_model_iter_next(GTK_TREE_MODEL(store), &iter))
if (++count > 10) gtk_list_store_remove(store, &iter); // keep 10 items
}
#elif CURSES