Skip to content

Commit 3be4ad7

Browse files
RestorerZchrisbra
authored andcommitted
runtime(optwin): Fix E94 when searching for the option-window
Problem: When the parameter debug=msg is set and the command :option is entered, error E94 will be displayed. Solution: Add a check for the existence of the buffer before getting the buffer number “option-window”. Reproduce: vim --clean -c "set debug=msg" -c "option" Error detected while processing command line..script D:\Programs\Vim\vim91\optwin.vim: line 9: E94: No matching buffer for option-window closes: #17927 Signed-off-by: RestorerZ <restorer@mail2k.ru> Signed-off-by: Christian Brabandt <cb@256bit.org>
1 parent 1bfe86a commit 3be4ad7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

runtime/optwin.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
" These commands create the option window.
22
"
33
" Maintainer: The Vim Project <https://github.com/vim/vim>
4-
" Last Change: 2025 Jul 25
4+
" Last Change: 2025 Aug 07
55
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
66

77
" If there already is an option window, jump to that one.
8-
let buf = bufnr('option-window')
8+
let buf = bufexists('option-window') ? bufnr('option-window') : -1
99
if buf >= 0
1010
let winids = win_findbuf(buf)
1111
if len(winids) > 0

0 commit comments

Comments
 (0)