diff options
author | Ville Hakulinen <ville.hakulinen@gmail.com> | 2020-07-15 15:46:47 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-15 08:46:47 -0400 |
commit | a02a267f8ad4b6d8b9038d2c7d9b85f03e734814 (patch) | |
tree | 2200a7ca1f4d61dc968073f3e9d7e2e4e9d2ebdd /runtime/lua/vim/lsp/callbacks.lua | |
parent | 1ca67a73c0ba680eb8328e68bea31f839855dd29 (diff) | |
download | rneovim-a02a267f8ad4b6d8b9038d2c7d9b85f03e734814.tar.gz rneovim-a02a267f8ad4b6d8b9038d2c7d9b85f03e734814.tar.bz2 rneovim-a02a267f8ad4b6d8b9038d2c7d9b85f03e734814.zip |
Reuse inccommand preview window (fix #11529) (#12612)
* Reuse inccommand preview window
Currently, show_sub (inside ex_substitute) creates a new split on each
run for its existing buffer, and ex_substitute calls close_windows for
it. This functionality seems to relay in delayed operations on window
structures where the close event on the newest window is "cancelled" by
win_grid_alloc. But for multigrid, there is optimization in place in
win_grid_alloc which causes any (unnecessary?) allocations to be
skipped, and thus inccommand preview window is not preserved but closed
immediately. Alternative fix would be to remove said optimization, but
the whole "lets create a new split each time and trash the earlier
window" seems too wasteful.
Fix #11529
* Update failing test
The failing test sets inccommand=split and does `:%s/.`, but isn't
expecting to get any contents for the preview window, other than the
windows status line. Update the test to include the preview window
contents too.
Diffstat (limited to 'runtime/lua/vim/lsp/callbacks.lua')
0 files changed, 0 insertions, 0 deletions