mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 06:58:35 +00:00
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.
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user