From 88bff5dfd24833520de3d3546a02b05741b6433c Mon Sep 17 00:00:00 2001 From: Marwan Tanager Date: Sat, 8 Jun 2013 01:35:10 +0200 Subject: [PATCH] Include backward-search commands in the history plain database Signed-off-by: Sebastian Ramacher --- database-plain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/database-plain.c b/database-plain.c index a8d6e6f..0282b71 100644 --- a/database-plain.c +++ b/database-plain.c @@ -647,7 +647,7 @@ plain_io_read(GiraraInputHistoryIO* db) girara_list_t* res = girara_list_new2(g_free); char** tmp = g_strsplit(content, "\n", 0); for (size_t i = 0; tmp[i] != NULL; ++i) { - if (strlen(tmp[i]) == 0 || strchr(":/", tmp[i][0]) == NULL) { + if (strlen(tmp[i]) == 0 || strchr(":/?", tmp[i][0]) == NULL) { continue; } girara_list_append(res, g_strdup(tmp[i])); @@ -688,7 +688,7 @@ plain_io_append(GiraraInputHistoryIO* db, const char* input) /* write input history file */ for (size_t i = 0; tmp[i] != NULL; ++i) { - if (strlen(tmp[i]) == 0 || strchr(":/", tmp[i][0]) == NULL || strcmp(tmp[i], input) == 0) { + if (strlen(tmp[i]) == 0 || strchr(":/?", tmp[i][0]) == NULL || strcmp(tmp[i], input) == 0) { continue; } fprintf(file, "%s\n", tmp[i]);