folds: pass column on fold creation

useful if we want to have inline folds later and/or let users create
folds that remember their start/end columns.
This commit is contained in:
Matthieu Coudron
2020-09-28 01:18:37 +02:00
parent c5ceefca79
commit 12fdb114d1
5 changed files with 142 additions and 110 deletions

View File

@@ -9297,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)