summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Carl <danielcarl@gmx.de>2014-06-03 12:29:39 +0200
committerDaniel Carl <danielcarl@gmx.de>2014-06-03 12:29:39 +0200
commit43439ab18d096603e076d64b00ae0b4f0c660e05 (patch)
tree6eca0e417335ce258707f4ded35b123fc7444ce5 /src
parent3bd6f28bdc9fa5471bf3a33c5dbc3fc8583c348b (diff)
Fixed not working * and # commands.
If a search phrase was marked and * or # was used, the right matches where highlighted but 'n' or 'N' did not jump to the next match.
Diffstat (limited to 'src')
-rw-r--r--src/command.c2
-rw-r--r--src/ex.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/command.c b/src/command.c
index d4d3502..5c85794 100644
--- a/src/command.c
+++ b/src/command.c
@@ -49,6 +49,8 @@ gboolean command_search(const Arg *arg)
/* set dearch dir only when the searching is started */
dir = arg->i > 0 ? 1 : -1;
query = arg->s;
+ /* add new search query to history and search register */
+ vb_register_add('/', query);
} else {
/* no search phrase given - continue a previous search */
query = vb_register_get('/');
diff --git a/src/ex.c b/src/ex.c
index e75a2e8..26a56c4 100644
--- a/src/ex.c
+++ b/src/ex.c
@@ -442,7 +442,6 @@ static void input_activate(void)
case '?':
mode_enter('n');
command_search(&((Arg){count, cmd}));
- vb_register_add('/', cmd);
history_add(HISTORY_SEARCH, cmd, NULL);
break;
@@ -454,6 +453,8 @@ static void input_activate(void)
case ':':
mode_enter('n');
ex_run_string(cmd);
+ /* TODO fill register and history in ex_run_string but not if this
+ * is called on reading the config file */
vb_register_add(':', cmd);
history_add(HISTORY_COMMAND, cmd, NULL);
break;