Skip to content

Commit 061012a

Browse files
committed
Minor fix
1 parent ae152c1 commit 061012a

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

autoload/scratch_buffer.vim

+4-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ function! scratch_buffer#open(file_ext, ...) abort
1616

1717
execute 'silent' open_method file_name
1818
setl noswapfile
19-
execute (open_method ==# 'vsp' ? 'vertical' : '') 'resize' buffer_size
19+
20+
if buffer_size !=# v:null
21+
execute (open_method ==# 'vsp' ? 'vertical' : '') 'resize' buffer_size
22+
endif
2023
endfunction
2124

2225
function! s:find_fresh_tmp_file(pattern) abort

plugin/scratch_buffer.vim

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ command! -bar -nargs=+ ScratchBufferOpen call scratch_buffer#open(<f-args>)
1515
" `:ScratchBufferCleanAllOf md`
1616
command! -bar -nargs=1 ScratchBufferCleanAllOf call scratch_buffer#clean_all_of(<q-args>)
1717

18-
let g:scratch_buffer_tmp_file_pattern = '/tmp/scratch-%d'
18+
let g:scratch_buffer_tmp_file_pattern = '/tmp/vim-scratch-buffer-%d'

0 commit comments

Comments
 (0)