Mercurial > vim
comparison src/proto/window.pro @ 34383:a84fe48ae523 v9.1.0118
patch 9.1.0118: Use different restoration strategy in win_splitmove
Commit: https://github.com/vim/vim/commit/704966c2545897dfcf426dd9ef946aeb6fa80c38
Author: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Date: Tue Feb 20 22:00:33 2024 +0100
patch 9.1.0118: Use different restoration strategy in win_splitmove
Problem: saving and restoring all frames to split-move is overkill now
that WinNewPre is not fired when split-moving.
Solution: defer the flattening of frames until win_split_ins begins
reorganising them, and attempt to restore the layout by
undoing our changes. (Sean Dewar)
This also means we no longer must allocate.
related: #14042
Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 20 Feb 2024 22:30:07 +0100 |
parents | 37b4c89ba420 |
children | 8b0e390b61fe |
comparison
equal
deleted
inserted
replaced
34382:17d926feeb82 | 34383:a84fe48ae523 |
---|---|
5 void do_window(int nchar, long Prenum, int xchar); | 5 void do_window(int nchar, long Prenum, int xchar); |
6 void get_wincmd_addr_type(char_u *arg, exarg_T *eap); | 6 void get_wincmd_addr_type(char_u *arg, exarg_T *eap); |
7 int check_split_disallowed(win_T *wp); | 7 int check_split_disallowed(win_T *wp); |
8 int win_split(int size, int flags); | 8 int win_split(int size, int flags); |
9 int win_splitmove(win_T *wp, int size, int flags); | 9 int win_splitmove(win_T *wp, int size, int flags); |
10 int win_split_ins(int size, int flags, win_T *new_wp, int dir); | 10 int win_split_ins(int size, int flags, win_T *new_wp, int dir, frame_T *to_flatten); |
11 int win_valid_popup(win_T *win); | 11 int win_valid_popup(win_T *win); |
12 int win_valid(win_T *win); | 12 int win_valid(win_T *win); |
13 win_T *win_find_by_id(int id); | 13 win_T *win_find_by_id(int id); |
14 int win_valid_any_tab(win_T *win); | 14 int win_valid_any_tab(win_T *win); |
15 int win_count(void); | 15 int win_count(void); |
26 void snapshot_windows_scroll_size(void); | 26 void snapshot_windows_scroll_size(void); |
27 void may_make_initial_scroll_size_snapshot(void); | 27 void may_make_initial_scroll_size_snapshot(void); |
28 void may_trigger_win_scrolled_resized(void); | 28 void may_trigger_win_scrolled_resized(void); |
29 void win_close_othertab(win_T *win, int free_buf, tabpage_T *tp); | 29 void win_close_othertab(win_T *win, int free_buf, tabpage_T *tp); |
30 void win_free_all(void); | 30 void win_free_all(void); |
31 win_T *winframe_remove(win_T *win, int *dirp, tabpage_T *tp); | 31 win_T *winframe_remove(win_T *win, int *dirp, tabpage_T *tp, frame_T **to_flatten); |
32 void close_others(int message, int forceit); | 32 void close_others(int message, int forceit); |
33 void unuse_tabpage(tabpage_T *tp); | 33 void unuse_tabpage(tabpage_T *tp); |
34 void use_tabpage(tabpage_T *tp); | 34 void use_tabpage(tabpage_T *tp); |
35 int win_alloc_first(void); | 35 int win_alloc_first(void); |
36 win_T *win_alloc_popup_win(void); | 36 win_T *win_alloc_popup_win(void); |