From 53ba6747f2d33c80f61ee81f07dde282dc825d29 Mon Sep 17 00:00:00 2001 From: Daniel Carl Date: Mon, 8 Dec 2014 00:09:59 +0100 Subject: [PATCH] Don't block search and url history if not typed (#133). If a command was not typed, it was not stored in history. But this is irritating if there is a map that opens a URI. In this case the URI was not written ti URL history, which feels wrong. So now only the ex command history recording is blocked if the content was not typed by the user or where given via vimb fifo. --- src/history.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/history.c b/src/history.c index 9035baf..63c210e 100644 --- a/src/history.c +++ b/src/history.c @@ -77,9 +77,9 @@ void history_add(HistoryType type, const char *value, const char *additional) { const char *file; - /* Don't write a history entry to the file if the commands where not typed - * by the user or the history max size is set to 0. */ - if (!vb.config.history_max || !vb.state.typed) { + /* Don't write a history entry if the history max size is set to 0. Else + * skip command history in case the command was not typed by the user. */ + if (!vb.config.history_max || (!vb.state.typed && type == HISTORY_COMMAND)) { return; } -- 2.20.1