mirror of
https://github.com/neovim/neovim.git
synced 2025-09-15 15:58:17 +00:00
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:
@@ -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
|
||||
|
Reference in New Issue
Block a user