Vim: Silence window restore error in build script
This commit is contained in:
parent
c95a03ded8
commit
7bc2349fbb
10
vimrc
10
vimrc
|
@ -164,15 +164,12 @@ function! RunBuildScript()
|
||||||
write
|
write
|
||||||
|
|
||||||
if l:existing_buf > 0
|
if l:existing_buf > 0
|
||||||
exe l:existing_buf . "wincmd w"
|
silent! exe l:existing_buf . " wincmd w"
|
||||||
"execute 'botright sb' l:existing_buf
|
"execute 'botright sb' l:existing_buf
|
||||||
else
|
else
|
||||||
botright sp __build_output_log__
|
botright sp __build_output_log__
|
||||||
|
setlocal buftype=nofile
|
||||||
resize 10
|
resize 10
|
||||||
" NOTE: this would throw an error if running the build in the output
|
|
||||||
" buffer, even though a check is done here to find an existing buffer
|
|
||||||
" before making a new one. Strange.
|
|
||||||
"setlocal buftype=nofile
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Clear the buffer
|
" Clear the buffer
|
||||||
|
@ -182,7 +179,7 @@ function! RunBuildScript()
|
||||||
let l:output = system("./build")
|
let l:output = system("./build")
|
||||||
call append(0, split(l:output, '\v\n'))
|
call append(0, split(l:output, '\v\n'))
|
||||||
|
|
||||||
exe l:current_buf . "wincmd w"
|
silent! exe l:existing_buf. " wincmd w"
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
nnoremap <leader>b :call RunBuildScript()<cr>
|
nnoremap <leader>b :call RunBuildScript()<cr>
|
||||||
|
@ -290,6 +287,7 @@ map <leader>gb :Gblame<cr>
|
||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
" SEARCHING
|
" SEARCHING
|
||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
" TODO: Not sure if I still need this
|
||||||
map <leader>gs :let @/ = ""<CR>
|
map <leader>gs :let @/ = ""<CR>
|
||||||
|
|
||||||
" Replace the selected text in all files within the repo
|
" Replace the selected text in all files within the repo
|
||||||
|
|
Loading…
Reference in New Issue
Block a user