mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.1.1891: functions used in one file are global
Problem: Functions used in one file are global. Solution: Add "static". (Yegappan Lakshmanan, closes #4840)
This commit is contained in:
31
src/window.c
31
src/window.c
@@ -39,8 +39,11 @@ static int leave_tabpage(buf_T *new_curbuf, int trigger_leave_autocmds);
|
||||
static void enter_tabpage(tabpage_T *tp, buf_T *old_curbuf, int trigger_enter_autocmds, int trigger_leave_autocmds);
|
||||
static void frame_fix_height(win_T *wp);
|
||||
static int frame_minheight(frame_T *topfrp, win_T *next_curwin);
|
||||
static int may_open_tabpage(void);
|
||||
static void win_enter_ext(win_T *wp, int undo_sync, int no_curwin, int trigger_new_autocmds, int trigger_enter_autocmds, int trigger_leave_autocmds);
|
||||
static void win_free(win_T *wp, tabpage_T *tp);
|
||||
static int win_unlisted(win_T *wp);
|
||||
static void win_append(win_T *after, win_T *wp);
|
||||
static void frame_append(frame_T *after, frame_T *frp);
|
||||
static void frame_insert(frame_T *before, frame_T *frp);
|
||||
static void frame_remove(frame_T *frp);
|
||||
@@ -3541,17 +3544,7 @@ close_others(
|
||||
emsg(_("E445: Other window contains changes"));
|
||||
}
|
||||
|
||||
/*
|
||||
* Init the current window "curwin".
|
||||
* Called when a new file is being edited.
|
||||
*/
|
||||
void
|
||||
curwin_init(void)
|
||||
{
|
||||
win_init_empty(curwin);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
win_init_empty(win_T *wp)
|
||||
{
|
||||
redraw_win_later(wp, NOT_VALID);
|
||||
@@ -3573,6 +3566,16 @@ win_init_empty(win_T *wp)
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Init the current window "curwin".
|
||||
* Called when a new file is being edited.
|
||||
*/
|
||||
void
|
||||
curwin_init(void)
|
||||
{
|
||||
win_init_empty(curwin);
|
||||
}
|
||||
|
||||
/*
|
||||
* Allocate the first window and put an empty buffer in it.
|
||||
* Called from main().
|
||||
@@ -3861,7 +3864,7 @@ win_new_tabpage(int after)
|
||||
* like with ":split".
|
||||
* Returns OK if a new tab page was created, FAIL otherwise.
|
||||
*/
|
||||
int
|
||||
static int
|
||||
may_open_tabpage(void)
|
||||
{
|
||||
int n = (cmdmod.tab == 0) ? postponed_split_tab : cmdmod.tab;
|
||||
@@ -4952,7 +4955,7 @@ win_free(
|
||||
* Return TRUE if "wp" is not in the list of windows: the autocmd window or a
|
||||
* popup window.
|
||||
*/
|
||||
int
|
||||
static int
|
||||
win_unlisted(win_T *wp)
|
||||
{
|
||||
return wp == aucmd_win || WIN_IS_POPUP(wp);
|
||||
@@ -4982,7 +4985,7 @@ win_free_popup(win_T *win)
|
||||
/*
|
||||
* Append window "wp" in the window list after window "after".
|
||||
*/
|
||||
void
|
||||
static void
|
||||
win_append(win_T *after, win_T *wp)
|
||||
{
|
||||
win_T *before;
|
||||
|
Reference in New Issue
Block a user