vim-patch:8.1.2001: some source files are too big (#21231)

Problem:    Some source files are too big.
Solution:   Move buffer and window related functions to evalbuffer.c and
            evalwindow.c. (Yegappan Lakshmanan, closes vim/vim#4898)

261f346f81
This commit is contained in:
zeertzjq
2022-11-29 16:47:29 +08:00
committed by GitHub
parent 98695b4999
commit 0b79137c59
19 changed files with 1746 additions and 1637 deletions

View File

@@ -3961,30 +3961,6 @@ char *buf_spname(buf_T *buf)
return NULL;
}
/// Find a window for buffer "buf".
/// If found true is returned and "wp" and "tp" are set to
/// the window and tabpage.
/// If not found, false is returned.
///
/// @param buf buffer to find a window for
/// @param[out] wp stores the found window
/// @param[out] tp stores the found tabpage
///
/// @return true if a window was found for the buffer.
bool find_win_for_buf(buf_T *buf, win_T **wp, tabpage_T **tp)
{
*wp = NULL;
*tp = NULL;
FOR_ALL_TAB_WINDOWS(tp2, wp2) {
if (wp2->w_buffer == buf) {
*tp = tp2;
*wp = wp2;
return true;
}
}
return false;
}
static int buf_signcols_inner(buf_T *buf, int maximum)
{
sign_entry_T *sign; // a sign in the sign list