From: Daniel Carl Date: Tue, 12 Nov 2013 19:28:02 +0000 (+0100) Subject: Fixed :qpush and :qunshift without parameters (#52). X-Git-Url: https://git.owens.tech///git?a=commitdiff_plain;h=340039de464186386930e56306be0d5ea7558ed3;p=vimb.git Fixed :qpush and :qunshift without parameters (#52). These commands should use current URI if they where called without any parameter, but cause of the migration of the way how we parse the inputbox, we got always a parameter or better right hand side. --- diff --git a/src/ex.c b/src/ex.c index e771ff2..f1689b9 100644 --- a/src/ex.c +++ b/src/ex.c @@ -764,7 +764,8 @@ static gboolean ex_open(const ExArg *arg) #ifdef FEATURE_QUEUE static gboolean ex_queue(const ExArg *arg) { - Arg a = {.s = arg->rhs->str}; + Arg a = {0}; + switch (arg->code) { case EX_QPUSH: a.i = COMMAND_QUEUE_PUSH; @@ -786,6 +787,12 @@ static gboolean ex_queue(const ExArg *arg) return false; } + /* if no argument is found in rhs, keep the uri in arg null to force + * command_queue() to use current URI */ + if (arg->rhs->len) { + a.s = arg->rhs->str; + } + return command_queue(&a); } #endif