minimap.vim icon indicating copy to clipboard operation
minimap.vim copied to clipboard

Error detected while processing BufWinEnter Autocommands for "*"..function minimap#vim#MinimapOpen[1]..<SNR>79_open_window:

Open Spixmaster opened this issue 2 years ago • 2 comments

Check list

  • [x] I have read through the README (especially F.A.Q section)
  • [x] I have searched through the existing issues

Environment info

  • OS
    • [x] Linux
    • [ ] Mac OS X
    • [ ] Windows
    • [ ] Others:

Version info

VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Jun 28 2022 16:22:51)
Compiled by Arch Linux
Huge version without GUI.  Features included (+) or not (-):
+acl               +file_in_path      +mouse_urxvt       -tag_any_white
+arabic            +find_in_path      +mouse_xterm       +tcl/dyn
+autocmd           +float             +multi_byte        +termguicolors
+autochdir         +folding           +multi_lang        +terminal
-autoservername    -footer            -mzscheme          +terminfo
-balloon_eval      +fork()            +netbeans_intg     +termresponse
+balloon_eval_term +gettext           +num64             +textobjects
-browse            -hangul_input      +packages          +textprop
++builtin_terms    +iconv             +path_extra        +timers
+byte_offset       +insert_expand     +perl/dyn          +title
+channel           +ipv6              +persistent_undo   -toolbar
+cindent           +job               +popupwin          +user_commands
-clientserver      +jumplist          +postscript        +vartabs
-clipboard         +keymap            +printer           +vertsplit
+cmdline_compl     +lambda            +profile           +vim9script
+cmdline_hist      +langmap           -python            +viminfo
+cmdline_info      +libcall           +python3/dyn       +virtualedit
+comments          +linebreak         +quickfix          +visual
+conceal           +lispindent        +reltime           +visualextra
+cryptv            +listcmds          +rightleft         +vreplace
+cscope            +localmap          +ruby/dyn          +wildignore
+cursorbind        +lua/dyn           +scrollbind        +wildmenu
+cursorshape       +menu              +signs             +windows
+dialog_con        +mksession         +smartindent       +writebackup
+diff              +modify_fname      -sodium            -X11
+digraphs          +mouse             -sound             -xfontset
-dnd               -mouseshape        +spell             -xim
-ebcdic            +mouse_dec         +startuptime       -xpm
+emacs_tags        +mouse_gpm         +statusline        -xsmp
+eval              -mouse_jsbterm     -sun_workshop      -xterm_clipboard
+ex_extra          +mouse_netterm     +syntax            -xterm_save
+extra_search      +mouse_sgr         +tag_binary
-farsi             -mouse_sysmouse    -tag_old_static
   system vimrc file: "/etc/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/vim/src=/usr/src/debug -flto=auto -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -L. -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.36/core_perl/CORE -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=auto -L/usr/local/lib -o vim -lm -ltinfo -lelf -lrt -lacl -lattr -lgpm -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.36/core_perl/CORE -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto -fstack-protector-strong -L/usr/local/lib -L/usr/lib/perl5/5.36/core_perl/CORE -lperl -lpthread -ldl -lm -lcrypt -lutil -lc -L/usr/lib -ltclstub8.6 -ldl -lz -lpthread -lm

Question / Problem and steps to reproduce

I get the following error when opening any file. This comes when opening my .vimrc with vim .vimrc.

".vimrc" 58L, 938B
Error detected while processing BufWinEnter Autocommands for "*"..function minimap#vim#MinimapOpen[1]..<SNR>79_open_window:
line    2:
E94: No matching buffer for -MINIMAP-
Press ENTER or type command to continue

This is my .vimrc. I tried whether one of my options causes the error but even the defaults cause this.

" Basic (priority)
set t_Co=256

" Basic
colorscheme default
filetype indent on
filetype plugin on
set autoindent
set autoread
set background=light
set backspace=eol,indent,start
set cdhome
set debug=msg
set encoding=utf-8
set laststatus=2
set nocompatible
set nowrap
set number
set shiftwidth=4
set smartindent
syntax on

" Commands
set history=100
set wildmenu

" Cursor
set cursorline
set cursorlineopt=line,number
set scrolloff=5

" Highlighting
highlight CursorLine cterm=None ctermbg=237
highlight CursorLineNr cterm=None ctermfg=15

" Plugins
call plug#begin('~/.vim/plugged')
Plug '/usr/share/vim/vimfiles/'
call plug#end()

"" vim-code-minimap-git
let g:minimap_auto_start = 1
let g:minimap_git_colors = 1
let g:minimap_highlight_range = 1
let g:minimap_highlight_search = 1
let g:minimap_width = 15

" Search
set hlsearch
set ignorecase
set incsearch
set showmatch
set smartcase

" Tabs
set expandtab
set smarttab
set tabstop=4

Spixmaster avatar Jul 12 '22 19:07 Spixmaster

I think you have an auto command in your vimrc file with a buffer name which spelt incorrectly -MINIMAP- and should change to _MINIMAP_

smzm avatar Aug 16 '22 10:08 smzm

@smzm I do not think so. Even with no other plugin running than this one the error occurs. Leaving the plugin options' default does not solve the issue too.

Spixmaster avatar Sep 20 '22 13:09 Spixmaster

I found the solution! The function bufwinnr() puts out the error message in case the buffer cannot be found but only does so with the option debug=msg in the vimrc.

There are two solutions to this probelm. One is obviously to remove the option debug and the other one is to precede bufwinnr() with silent!.

Reference: https://github.com/beloglazov/vim-online-thesaurus/issues/25

Spixmaster avatar Sep 27 '22 10:09 Spixmaster