now we use -1 for backward and 1 for forward which is easier to use in the
most cases.
gboolean command_history(const Arg* arg)
{
const int count = vb.state.count ? vb.state.count : 1;
- const gint step = count * (arg->i == VB_SEARCH_BACKWARD ? -1 : 1);
+ const gint step = count * arg->i;
const char* entry = history_get(HISTORY_COMMAND, step);
if (!entry) {
};
typedef enum {
- VB_SEARCH_FORWARD,
- VB_SEARCH_BACKWARD,
- VB_SEARCH_OFF,
+ VB_SEARCH_FORWARD = 1,
+ VB_SEARCH_BACKWARD = -1,
+ VB_SEARCH_OFF = 0
} SearchDirection;
typedef enum {