aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_docmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r--src/nvim/ex_docmd.c29
1 files changed, 17 insertions, 12 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index dfebd13868..7bb4bd32a3 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -2228,17 +2228,19 @@ int parse_command_modifiers(exarg_T *eap, char_u **errormsg, bool skip_only)
continue;
case 't': if (checkforcmd(&p, "tab", 3)) {
- long tabnr = get_address(
- eap, &eap->cmd, ADDR_TABS, eap->skip, skip_only, false, 1);
+ if (!skip_only) {
+ long tabnr = get_address(
+ eap, &eap->cmd, ADDR_TABS, eap->skip, skip_only, false, 1);
- if (tabnr == MAXLNUM) {
- cmdmod.tab = tabpage_index(curtab) + 1;
- } else {
- if (tabnr < 0 || tabnr > LAST_TAB_NR) {
- *errormsg = (char_u *)_(e_invrange);
- return false;
+ if (tabnr == MAXLNUM) {
+ cmdmod.tab = tabpage_index(curtab) + 1;
+ } else {
+ if (tabnr < 0 || tabnr > LAST_TAB_NR) {
+ *errormsg = (char_u *)_(e_invrange);
+ return false;
+ }
+ cmdmod.tab = tabnr + 1;
}
- cmdmod.tab = tabnr + 1;
}
eap->cmd = p;
continue;
@@ -9295,14 +9297,17 @@ static void ex_match(exarg_T *eap)
static void ex_fold(exarg_T *eap)
{
if (foldManualAllowed(true)) {
- foldCreate(curwin, eap->line1, eap->line2);
+ pos_T start = { eap->line1, 1, 0 };
+ pos_T end = { eap->line2, 1, 0 };
+ foldCreate(curwin, start, end);
}
}
static void ex_foldopen(exarg_T *eap)
{
- opFoldRange(eap->line1, eap->line2, eap->cmdidx == CMD_foldopen,
- eap->forceit, FALSE);
+ pos_T start = { eap->line1, 1, 0 };
+ pos_T end = { eap->line2, 1, 0 };
+ opFoldRange(start, end, eap->cmdidx == CMD_foldopen, eap->forceit, false);
}
static void ex_folddo(exarg_T *eap)