diff options
author | Matthieu Coudron <mattator@gmail.com> | 2020-04-24 18:38:48 +0200 |
---|---|---|
committer | Matthieu Coudron <mattator@gmail.com> | 2020-04-24 20:28:44 +0200 |
commit | d20142a31f40140ae789e20d86094ecccb84d6fb (patch) | |
tree | 53686541fe58829c66b07436e9c0d5cfb5ab5626 /src/nvim/ex_cmds.c | |
parent | deb4566cab91a487f2b0b0b5b4b427138f377afe (diff) | |
download | rneovim-d20142a31f40140ae789e20d86094ecccb84d6fb.tar.gz rneovim-d20142a31f40140ae789e20d86094ecccb84d6fb.tar.bz2 rneovim-d20142a31f40140ae789e20d86094ecccb84d6fb.zip |
folds: decrease reliance on global 'curwin'
TODO in a future commit:
- remains 2 instances of changed_lines that dont take into account
buffer
Diffstat (limited to 'src/nvim/ex_cmds.c')
-rw-r--r-- | src/nvim/ex_cmds.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c index 1cd95f2ed9..d26d3387f8 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -882,7 +882,7 @@ int do_move(linenr_T line1, linenr_T line2, linenr_T dest) mark_adjust_nofold(line2 + 1, dest, -num_lines, 0L, kExtmarkNOOP); FOR_ALL_TAB_WINDOWS(tab, win) { if (win->w_buffer == curbuf) { - foldMoveRange(&win->w_folds, line1, line2, dest); + foldMoveRange(win, &win->w_folds, line1, line2, dest); } } curbuf->b_op_start.lnum = dest - num_lines + 1; @@ -891,7 +891,7 @@ int do_move(linenr_T line1, linenr_T line2, linenr_T dest) mark_adjust_nofold(dest + 1, line1 - 1, num_lines, 0L, kExtmarkNOOP); FOR_ALL_TAB_WINDOWS(tab, win) { if (win->w_buffer == curbuf) { - foldMoveRange(&win->w_folds, dest + 1, line1 - 1, line2); + foldMoveRange(win, &win->w_folds, dest + 1, line1 - 1, line2); } } curbuf->b_op_start.lnum = dest + 1; |