Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From 4e94ec3df948a3ba39c871edd870b411cc64a8d4 Mon Sep 17 00:00:00 2001
- From: thinca <thinca@gmail.com>
- Date: Mon, 9 Nov 2009 23:27:55 +0900
- Subject: [PATCH 2/2] vim: fakeclip: Fix a bug when paste the screen buffer
- The writebuf command of screen not make a file if buffer is empty.
- ---
- vim/dot.vim/autoload/fakeclip.vim | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
- diff --git a/vim/dot.vim/autoload/fakeclip.vim b/vim/dot.vim/autoload/fakeclip.vim
- index 228f559..6c171ca 100644
- --- a/vim/dot.vim/autoload/fakeclip.vim
- +++ b/vim/dot.vim/autoload/fakeclip.vim
- @@ -153,7 +153,7 @@ endfunction
- function! s:read_screen_gnuscreen()
- let _ = tempname()
- call system('screen -X writebuf ' . shellescape(_))
- - let content = join(readfile(_, 'b'), "\n")
- + let content = filereadable(_) ? join(readfile(_, 'b'), "\n") : ''
- call delete(_)
- return content
- endfunction
- --
- 1.6.5.2
Add Comment
Please, Sign In to add comment