annotate src/proto/window.pro @ 27805:afbe86e8b24a v8.2.4428

patch 8.2.4428: crash when switching tabpage while in the cmdline window Commit: https://github.com/vim/vim/commit/0f6e28f686dbb59ab3b562408ab9b2234797b9b1 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Feb 20 20:49:35 2022 +0000 patch 8.2.4428: crash when switching tabpage while in the cmdline window Problem: Crash when switching tabpage while in the cmdline window. Solution: Disallow switching tabpage when in the cmdline window.
author Bram Moolenaar <Bram@vim.org>
date Sun, 20 Feb 2022 22:00:03 +0100
parents 18cafa092e8d
children a52a5e3363c4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 /* window.c */
27805
afbe86e8b24a patch 8.2.4428: crash when switching tabpage while in the cmdline window
Bram Moolenaar <Bram@vim.org>
parents: 27032
diff changeset
2 win_T *prevwin_curwin(void);
7668
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
3 void do_window(int nchar, long Prenum, int xchar);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
4 void get_wincmd_addr_type(char_u *arg, exarg_T *eap);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
5 int win_split(int size, int flags);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
6 int win_split_ins(int size, int flags, win_T *new_wp, int dir);
17051
221d4b82bc0b patch 8.1.1525: cannot move a popup window with the mouse
Bram Moolenaar <Bram@vim.org>
parents: 16847
diff changeset
7 int win_valid_popup(win_T *win);
7668
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
8 int win_valid(win_T *win);
22838
80bd5de5dcab patch 8.2.1966: popup becomes current window after closing a terminal window
Bram Moolenaar <Bram@vim.org>
parents: 22470
diff changeset
9 win_T *win_find_by_id(int id);
9875
42adbf172ecd commit https://github.com/vim/vim/commit/e59215c7dcae17b03daf39517560cfaa03314f5a
Christian Brabandt <cb@256bit.org>
parents: 9858
diff changeset
10 int win_valid_any_tab(win_T *win);
7668
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
11 int win_count(void);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
12 int make_windows(int count, int vertical);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
13 void win_move_after(win_T *win1, win_T *win2);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
14 void win_equal(win_T *next_curwin, int current, int dir);
22470
f7471450243c patch 8.2.1783: try-catch test fails
Bram Moolenaar <Bram@vim.org>
parents: 21703
diff changeset
15 void entering_window(win_T *win);
7668
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
16 void close_windows(buf_T *buf, int keep_curwin);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
17 int one_window(void);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
18 int win_close(win_T *win, int free_buf);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
19 void win_close_othertab(win_T *win, int free_buf, tabpage_T *tp);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
20 void win_free_all(void);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
21 win_T *winframe_remove(win_T *win, int *dirp, tabpage_T *tp);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
22 void close_others(int message, int forceit);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
23 void curwin_init(void);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
24 int win_alloc_first(void);
16778
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16401
diff changeset
25 win_T *win_alloc_popup_win(void);
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16401
diff changeset
26 void win_init_popup_win(win_T *wp, buf_T *buf);
7668
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
27 void win_init_size(void);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
28 void free_tabpage(tabpage_T *tp);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
29 int win_new_tabpage(int after);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
30 int make_tabpages(int maxcount);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
31 int valid_tabpage(tabpage_T *tpc);
11199
e08ead1d269f patch 8.0.0486: crash and endless loop when closing windows in autocmd
Christian Brabandt <cb@256bit.org>
parents: 10013
diff changeset
32 int valid_tabpage_win(tabpage_T *tpc);
13963
1174611ad715 Vim 8.1 release
Christian Brabandt <cb@256bit.org>
parents: 11199
diff changeset
33 void close_tabpage(tabpage_T *tab);
7668
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
34 tabpage_T *find_tabpage(int n);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
35 int tabpage_index(tabpage_T *ftp);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
36 void goto_tabpage(int n);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
37 void goto_tabpage_tp(tabpage_T *tp, int trigger_enter_autocmds, int trigger_leave_autocmds);
21703
22583b9d4efd patch 8.2.1401: cannot jump to the last used tabpage
Bram Moolenaar <Bram@vim.org>
parents: 18010
diff changeset
38 int goto_tabpage_lastused(void);
7668
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
39 void goto_tabpage_win(tabpage_T *tp, win_T *wp);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
40 void tabpage_move(int nr);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
41 void win_goto(win_T *wp);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
42 win_T *win_find_nr(int winnr);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
43 tabpage_T *win_find_tabpage(win_T *win);
16271
243cdc183ec9 patch 8.1.1140: not easy to find out what neighbors a window has
Bram Moolenaar <Bram@vim.org>
parents: 15814
diff changeset
44 win_T *win_vert_neighbor(tabpage_T *tp, win_T *wp, int up, long count);
16354
b3bc3ba07bef patch 8.1.1182: some function prototypes are outdated
Bram Moolenaar <Bram@vim.org>
parents: 16271
diff changeset
45 win_T *win_horz_neighbor(tabpage_T *tp, win_T *wp, int left, long count);
7668
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
46 void win_enter(win_T *wp, int undo_sync);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
47 win_T *buf_jump_open_win(buf_T *buf);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
48 win_T *buf_jump_open_tab(buf_T *buf);
16778
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16401
diff changeset
49 void win_free_popup(win_T *win);
7668
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
50 void win_remove(win_T *wp, tabpage_T *tp);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
51 int win_alloc_lines(win_T *wp);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
52 void win_free_lsize(win_T *wp);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
53 void shell_new_rows(void);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
54 void shell_new_columns(void);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
55 void win_size_save(garray_T *gap);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
56 void win_size_restore(garray_T *gap);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
57 int win_comp_pos(void);
26468
2fc13817b100 patch 8.2.3764: cannot see any text when window was made zero lines
Bram Moolenaar <Bram@vim.org>
parents: 26121
diff changeset
58 void win_ensure_size(void);
7668
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
59 void win_setheight(int height);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
60 void win_setheight_win(int height, win_T *win);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
61 void win_setwidth(int width);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
62 void win_setwidth_win(int width, win_T *wp);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
63 void win_setminheight(void);
14057
be8fb2fd51fc patch 8.1.0046: loading a session file fails if 'winheight' is big
Christian Brabandt <cb@256bit.org>
parents: 13963
diff changeset
64 void win_setminwidth(void);
7668
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
65 void win_drag_status_line(win_T *dragwin, int offset);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
66 void win_drag_vsep_line(win_T *dragwin, int offset);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
67 void set_fraction(win_T *wp);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
68 void win_new_height(win_T *wp, int height);
10013
942d40a92be6 commit https://github.com/vim/vim/commit/46328f9a1cc8047d1e05095bc9f531038c5a4028
Christian Brabandt <cb@256bit.org>
parents: 9875
diff changeset
69 void scroll_to_fraction(win_T *wp, int prev_height);
7668
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
70 void win_new_width(win_T *wp, int width);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
71 void win_comp_scroll(win_T *wp);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
72 void command_height(void);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
73 void last_status(int morewin);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
74 int tabline_height(void);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
75 int min_rows(void);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
76 int only_one_window(void);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
77 void check_lnums(int do_curwin);
16401
3b2db762a509 patch 8.1.1205: a BufReadPre autocommand may cause the cursor to move
Bram Moolenaar <Bram@vim.org>
parents: 16354
diff changeset
78 void reset_lnums(void);
7668
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
79 void make_snapshot(int idx);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
80 void restore_snapshot(int idx, int close_curwin);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
81 int win_hasvertsplit(void);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
82 int get_win_number(win_T *wp, win_T *first_win);
21b0a39d13ed commit https://github.com/vim/vim/commit/ef26954a35207c3f17d6ed35d9a40c918d974892
Christian Brabandt <cb@256bit.org>
parents: 7311
diff changeset
83 int get_tab_number(tabpage_T *tp);
17940
079e10a49ea1 patch 8.1.1966: some code in options.c fits better elsewhere
Bram Moolenaar <Bram@vim.org>
parents: 17893
diff changeset
84 char *check_colorcolumn(win_T *wp);
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 /* vim: set ft=c : */