1- " DrawIt.vim: a simple way to draw things in Vim -- just put this file in
1+ " DrawIt.vim: a simple way to draw things in Vim
22"
3- " Maintainer: Charles E. Campbell, Jr. ([email protected] ) 4- " Authors: Charles E. Campbell, Jr. ([email protected] - NOSPAM) 3+ " Maintainer: Charles E. Campbell, Jr.
4+ " Authors: Charles E. Campbell, Jr. <[email protected] > - NOSPAM55" Sylvain Viart ([email protected] )6- " Version: 9
7- " Date: Oct 10, 2007
6+ " Version: 10
7+ " Date: Jun 12, 2008
88"
99" Quick Setup: {{{1
1010" tar -oxvf DrawIt.tar
@@ -49,7 +49,7 @@ set cpo&vim
4949if ! exists (" s:saveposn_count" )
5050 let s: saveposn_count= 0
5151endif
52- let g: loaded_DrawIt= " v9 "
52+ let g: loaded_DrawIt= " v10 "
5353" DechoTabOn
5454
5555" =====================================================================
@@ -1573,6 +1573,9 @@ fun! s:CLeftStart()
15731573 if s: cleft_height < 0
15741574 let s: cleft_height= - s: cleft_height
15751575 endif
1576+ if exists (" s:cleft_oldblock" )
1577+ unlet s: cleft_oldblock
1578+ endif
15761579" call Decho("blocksize: ".s:cleft_height."x".s:cleft_width)
15771580 noremap <silent> <c-leftdrag> :<c-u> call <SID> CLeftDrag()<cr>
15781581 noremap <silent> <c-leftrelease> <leftmouse> :<c-u> call <SID> CLeftRelease()<cr>
@@ -1592,10 +1595,6 @@ fun! s:CLeftDrag()
15921595" call Decho("draw prior contents<".s:cleft_oldblock.">")
15931596 exe ' let @' .b: drawit_brush .' =s:cleft_oldblock'
15941597 call s: PutBlock (b: drawit_brush ,1 )
1595- else
1596- " first move; put blanks where text had been
1597- " call Decho("first move, put blanks where text was")
1598- norm! gvr
15991598 endif
16001599
16011600 " move cursor to <leftmouse> position
@@ -1613,6 +1612,7 @@ fun! s:CLeftDrag()
16131612 exe " silent! norm! \<c-v> " .s: cleft_height .' j"' .b: drawit_brush .' y'
16141613 endif
16151614 exe " let s:cleft_oldblock= @" .b: drawit_brush
1615+ " call Decho("s:cleft_oldblock=@".b:drawit_brush)
16161616" call Decho("cleft_height=".s:cleft_height." cleft_width=".s:cleft_width)
16171617" call Decho("save contents<".s:cleft_oldblock.">")
16181618
0 commit comments