mirror of
https://github.com/neovim/neovim.git
synced 2025-09-18 17:28:23 +00:00
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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user