mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-11-11 02:53:48 +01:00
Include backward-search commands in the history plain database
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
parent
cc3b9aea18
commit
88bff5dfd2
@ -647,7 +647,7 @@ plain_io_read(GiraraInputHistoryIO* db)
|
|||||||
girara_list_t* res = girara_list_new2(g_free);
|
girara_list_t* res = girara_list_new2(g_free);
|
||||||
char** tmp = g_strsplit(content, "\n", 0);
|
char** tmp = g_strsplit(content, "\n", 0);
|
||||||
for (size_t i = 0; tmp[i] != NULL; ++i) {
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
girara_list_append(res, g_strdup(tmp[i]));
|
girara_list_append(res, g_strdup(tmp[i]));
|
||||||
@ -688,7 +688,7 @@ plain_io_append(GiraraInputHistoryIO* db, const char* input)
|
|||||||
|
|
||||||
/* write input history file */
|
/* write input history file */
|
||||||
for (size_t i = 0; tmp[i] != NULL; ++i) {
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
fprintf(file, "%s\n", tmp[i]);
|
fprintf(file, "%s\n", tmp[i]);
|
||||||
|
Loading…
Reference in New Issue
Block a user