aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/fold.c
diff options
context:
space:
mode:
authorFamiu Haque <famiuhaque@protonmail.com>2022-04-20 17:02:18 +0600
committerFamiu Haque <famiuhaque@protonmail.com>2022-05-31 20:55:05 +0600
commit46536f53e82967dcac8d030ee3394cdb156f9603 (patch)
tree4444067831639a6a1eb1916ca9cd5002261932ec /src/nvim/fold.c
parente9803e1de6497ee21f77f45cf2670c2fe4e8ab22 (diff)
downloadrneovim-46536f53e82967dcac8d030ee3394cdb156f9603.tar.gz
rneovim-46536f53e82967dcac8d030ee3394cdb156f9603.tar.bz2
rneovim-46536f53e82967dcac8d030ee3394cdb156f9603.zip
feat: add preview functionality to user commands
Adds a Lua-only `preview` flag to user commands which allows the command to be incrementally previewed like `:substitute` when 'inccommand' is set.
Diffstat (limited to 'src/nvim/fold.c')
-rw-r--r--src/nvim/fold.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/nvim/fold.c b/src/nvim/fold.c
index 234c11227d..d5277b9910 100644
--- a/src/nvim/fold.c
+++ b/src/nvim/fold.c
@@ -754,8 +754,7 @@ void deleteFold(win_T *const wp, const linenr_T start, const linenr_T end, const
// the modification of the *first* line of the fold, but we send through a
// notification that includes every line that was part of the fold
int64_t num_changed = last_lnum - first_lnum;
- buf_updates_send_changes(wp->w_buffer, first_lnum, num_changed,
- num_changed, true);
+ buf_updates_send_changes(wp->w_buffer, first_lnum, num_changed, num_changed);
}
}
@@ -1614,7 +1613,7 @@ static void foldCreateMarkers(win_T *wp, pos_T start, pos_T end)
// u_save() is unable to save the buffer line, but we send the
// nvim_buf_lines_event anyway since it won't do any harm.
int64_t num_changed = 1 + end.lnum - start.lnum;
- buf_updates_send_changes(buf, start.lnum, num_changed, num_changed, true);
+ buf_updates_send_changes(buf, start.lnum, num_changed, num_changed);
}
// foldAddMarker() {{{2