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
2
2
"
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] > - NOSPAM
5
5
" Sylvain Viart ([email protected] )
6
- " Version: 9
7
- " Date: Oct 10, 2007
6
+ " Version: 10
7
+ " Date: Jun 12, 2008
8
8
"
9
9
" Quick Setup: {{{1
10
10
" tar -oxvf DrawIt.tar
@@ -49,7 +49,7 @@ set cpo&vim
49
49
if ! exists (" s:saveposn_count" )
50
50
let s: saveposn_count= 0
51
51
endif
52
- let g: loaded_DrawIt= " v9 "
52
+ let g: loaded_DrawIt= " v10 "
53
53
" DechoTabOn
54
54
55
55
" =====================================================================
@@ -1573,6 +1573,9 @@ fun! s:CLeftStart()
1573
1573
if s: cleft_height < 0
1574
1574
let s: cleft_height= - s: cleft_height
1575
1575
endif
1576
+ if exists (" s:cleft_oldblock" )
1577
+ unlet s: cleft_oldblock
1578
+ endif
1576
1579
" call Decho("blocksize: ".s:cleft_height."x".s:cleft_width)
1577
1580
noremap <silent> <c-leftdrag> :<c-u> call <SID> CLeftDrag()<cr>
1578
1581
noremap <silent> <c-leftrelease> <leftmouse> :<c-u> call <SID> CLeftRelease()<cr>
@@ -1592,10 +1595,6 @@ fun! s:CLeftDrag()
1592
1595
" call Decho("draw prior contents<".s:cleft_oldblock.">")
1593
1596
exe ' let @' .b: drawit_brush .' =s:cleft_oldblock'
1594
1597
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
1599
1598
endif
1600
1599
1601
1600
" move cursor to <leftmouse> position
@@ -1613,6 +1612,7 @@ fun! s:CLeftDrag()
1613
1612
exe " silent! norm! \<c-v> " .s: cleft_height .' j"' .b: drawit_brush .' y'
1614
1613
endif
1615
1614
exe " let s:cleft_oldblock= @" .b: drawit_brush
1615
+ " call Decho("s:cleft_oldblock=@".b:drawit_brush)
1616
1616
" call Decho("cleft_height=".s:cleft_height." cleft_width=".s:cleft_width)
1617
1617
" call Decho("save contents<".s:cleft_oldblock.">")
1618
1618
0 commit comments