Skip to content

Commit

Permalink
remove log "Invalid in command-line window"
Browse files Browse the repository at this point in the history
for example, vim org cmd "q:" or "q/"
  • Loading branch information
zhanghaolong committed May 25, 2021
1 parent ad72976 commit 58a0f57
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions plugin/minibufexpl.vim
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,10 @@ function! <SID>StartExplorer(curBufNum)
return
endif

call <SID>CreateWindow('-MiniBufExplorer-', g:miniBufExplVSplit, g:miniBufExplBRSplit, g:miniBufExplSplitToEdge, 1, 1)
try
call <SID>CreateWindow('-MiniBufExplorer-', g:miniBufExplVSplit, g:miniBufExplBRSplit, g:miniBufExplSplitToEdge, 1, 1)
catch /.*/
endtry

let l:winNum = <SID>FindWindow('-MiniBufExplorer-', 1)

Expand Down Expand Up @@ -2456,7 +2459,10 @@ function! s:SwitchWindow(action, ...)
call <SID>DEBUG('previous window is: '.winnr(),10)
let l:wincmd = l:aucmd.l:winnr.'wincmd '.a:action
call <SID>DEBUG('window switching command is: '.l:wincmd,10)
exec l:wincmd
try
exec l:wincmd
catch /.*/
endtry
call <SID>DEBUG('current window is: '.winnr(),10)

call <SID>DEBUG('Leaving SwitchWindow()',10)
Expand Down

0 comments on commit 58a0f57

Please sign in to comment.