diff options
author | 2009-02-08 14:30:11 -0500 | |
---|---|---|
committer | 2009-02-08 14:30:11 -0500 | |
commit | d0f74fd99b9137ddd695f4c2abf288f7c1cd52e0 (patch) | |
tree | 7c55f24341fcc547b43db4a3e636691683e7b254 /src | |
parent | 1a88e1bb64c5b6fc8fadab5b184d7e4b608ddec0 (diff) | |
download | textadept-d0f74fd99b9137ddd695f4c2abf288f7c1cd52e0.tar.gz textadept-d0f74fd99b9137ddd695f4c2abf288f7c1cd52e0.zip |
Keep up to 10 items in the find/replace history; src/textadept.c
Diffstat (limited to 'src')
-rw-r--r-- | src/textadept.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/textadept.c b/src/textadept.c index 80fe526b..dc8ef49b 100644 --- a/src/textadept.c +++ b/src/textadept.c @@ -955,6 +955,9 @@ static void find_add_to_history(const char *text, GtkListStore *store) { gtk_list_store_prepend(store, &iter); 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)) + if (++count > 10) gtk_list_store_remove(store, &iter); // keep 10 items } } |