From: Joachim Kock (kock@math.unice.fr)
Date: 8 Mar 01, 06:04 EST
From: Joachim Kock <kock@math.unice.fr>
Subject: Re: Twiddle?
> (i) twiddling the characters which straddle the cursor
> (ii) not ignoring spaces
> (iii) return with the cursor where it was to begin with
I fully agree with (ii) and (iii)
Concerning (i), I find the new behaviour much better (twiddling the two
preceding chars): typically (type-ically) you discover your erorr just
after committing it and then you just twiddle - no need to move the
cursor backwards first and forwards again after twiddling (as in the
old twiddle behaviour)...
So my twiddle proc is simply this:
proc twiddle {} {
set orSelStart [getPos]
set orPos [selEnd]
if {[pos::compare $orPos < [pos::math [minPos] + 2]]} return
set pos $orPos
set one [lookAt [pos::math $pos -1]]
set two [lookAt [pos::math $pos - 2]]
replaceText [pos::math $pos -2] $pos "$one$two"
select $orSelStart $orPos
message "twiddled chars: '$one$two'"
}
- it's just a subset of the distributed proc...
Joachim.
_______________________________________________
AlphaTcl-developers mailing list
AlphaTcl-developers@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/alphatcl-developers