commit f2d92ba6ca5c5265463a30e30b63bae5f022f278 parent b79ed66e4a21d52f5870bb01f5145756bbbbf981 Author: Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> Date: Thu, 17 Jul 2025 23:28:12 -0400 refactor: fixup! vim-patch:8.1.0877: new buffer https://github.com/neovim/neovim/pull/9674 removed switch_to_win_for_buf(). This vim-patch removed the last relevant usage of find_win_for_buf() Vim uses switch_to_win_for_buf() only for if_py_both. Diffstat:
| M | src/nvim/eval/buffer.c | | | 24 | ------------------------ |
1 file changed, 0 insertions(+), 24 deletions(-)
diff --git a/src/nvim/eval/buffer.c b/src/nvim/eval/buffer.c @@ -706,27 +706,3 @@ void restore_buffer(bufref_T *save_curbuf) curbuf->b_nwindows++; } } - -/// 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; -}