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.
/* 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('/');
case '?':
mode_enter('n');
command_search(&((Arg){count, cmd}));
- vb_register_add('/', cmd);
history_add(HISTORY_SEARCH, cmd, NULL);
break;
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;