diff options
author | Matthieu Coudron <mattator@gmail.com> | 2020-04-16 21:29:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-16 21:29:04 +0200 |
commit | fb4c7a53cfe4d4c8a786c8a5dc3c4b999c2df815 (patch) | |
tree | 199bd3bbba8744358c79cf58bdf872f1b4768d76 /src/nvim/ex_docmd.c | |
parent | a5818204b1124efea432377fc447a742cfec9ad1 (diff) | |
download | rneovim-fb4c7a53cfe4d4c8a786c8a5dc3c4b999c2df815.tar.gz rneovim-fb4c7a53cfe4d4c8a786c8a5dc3c4b999c2df815.tar.bz2 rneovim-fb4c7a53cfe4d4c8a786c8a5dc3c4b999c2df815.zip |
folds: decrease reliance on global "curwin" (#12132)
Pass the window in which to create/delete folds instead of using the
global "curwin" (current window).
Preliminary work for a fold API.
TODO: I kept changed_lines prototype unchanged. This should be updated
when a fold API sees the light.
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r-- | src/nvim/ex_docmd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index a86b8ec871..27d5e4998f 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -9291,8 +9291,9 @@ static void ex_match(exarg_T *eap) static void ex_fold(exarg_T *eap) { - if (foldManualAllowed(TRUE)) - foldCreate(eap->line1, eap->line2); + if (foldManualAllowed(true)) { + foldCreate(curwin, eap->line1, eap->line2); + } } static void ex_foldopen(exarg_T *eap) |