From: Daniel Carl Date: Mon, 22 Jul 2013 15:23:17 +0000 (+0200) Subject: Don't handle command and :open history different. X-Git-Url: https://git.owens.tech///git?a=commitdiff_plain;h=c54566a54522c932887d7ebb29a78bdf477f219d;p=vimb.git Don't handle command and :open history different. The stepping through history via and keys generated different items for ':open' and ':open '. The reason for this was that we looked up the history file to get the item, ':open' entries where collected from command history file where also none url entries are available (like call with shortcuts). Now the history lookup does not distinguish between commands and urls and follows the inspiring example of vim, where ':e ' also lists none processed values like ':e %'. --- diff --git a/src/history.c b/src/history.c index 8072962..4e08ef6 100644 --- a/src/history.c +++ b/src/history.c @@ -204,13 +204,10 @@ static GList *get_list(const char *input) input_type = vb_get_input_parts(input, &prefix, &suffix); /* get the right history type and command prefix */ - if (input_type == VB_INPUT_OPEN + if (input_type == VB_INPUT_COMMAND + || input_type == VB_INPUT_OPEN || input_type == VB_INPUT_TABOPEN ) { - type = HISTORY_URL; - OVERWRITE_STRING(history.query, suffix); - OVERWRITE_STRING(history.prefix, prefix); - } else if (input_type == VB_INPUT_COMMAND) { type = HISTORY_COMMAND; OVERWRITE_STRING(history.query, suffix); OVERWRITE_STRING(history.prefix, prefix);