diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-08-31 06:58:28 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-31 06:58:28 +0800 |
commit | 518b5c65b0c6f5ee75718048fc661e629a01429b (patch) | |
tree | b369841e7960a1811dc3cddb60ca782eb0cae49d /src/nvim/window.c | |
parent | 94a2bc594020f2bb1f41d5e2e92d05ce9c293254 (diff) | |
download | rneovim-518b5c65b0c6f5ee75718048fc661e629a01429b.tar.gz rneovim-518b5c65b0c6f5ee75718048fc661e629a01429b.tar.bz2 rneovim-518b5c65b0c6f5ee75718048fc661e629a01429b.zip |
vim-patch:8.1.2037: can call win_gotoid() in cmdline window (#20015)
Problem: Can call win_gotoid() in cmdline window.
Solution: Disallow switching windows. (Yasuhiro Matsumoto, closes vim/vim#4940)
https://github.com/vim/vim/commit/a046b37c22bcabdea5f0fd6d21ca4bd0aa4c768e
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r-- | src/nvim/window.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c index 5adc8db088..74ea1172ee 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -7396,19 +7396,6 @@ int win_getid(typval_T *argvars) return 0; } -int win_gotoid(typval_T *argvars) -{ - int id = (int)tv_get_number(&argvars[0]); - - FOR_ALL_TAB_WINDOWS(tp, wp) { - if (wp->handle == id) { - goto_tabpage_win(tp, wp); - return 1; - } - } - return 0; -} - void win_get_tabwin(handle_T id, int *tabnr, int *winnr) { *tabnr = 0; |