diff options
author | Matthieu Coudron <mcoudron@hotmail.com> | 2020-09-28 01:18:37 +0200 |
---|---|---|
committer | Matthieu Coudron <mcoudron@hotmail.com> | 2020-09-28 23:53:10 +0200 |
commit | 12fdb114d1fdc85a26cf60e9af91b243cc59cfa0 (patch) | |
tree | ff3c371172006d13aa22e91a980118386c0dad01 /src/nvim/ex_docmd.c | |
parent | c5ceefca793b8a78cc22a553b243d66042776d5f (diff) | |
download | rneovim-12fdb114d1fdc85a26cf60e9af91b243cc59cfa0.tar.gz rneovim-12fdb114d1fdc85a26cf60e9af91b243cc59cfa0.tar.bz2 rneovim-12fdb114d1fdc85a26cf60e9af91b243cc59cfa0.zip |
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.
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r-- | src/nvim/ex_docmd.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index 60b017be28..7bb4bd32a3 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -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) |