[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Moving cursor between words in TMerge

From: Alexander Klenin <klenin_at_gmail.com>
Date: 2007-10-28 16:17:00 CET

On 10/27/07, Simon Large <simon.tortoisesvn@googlemail.com> wrote:

> Ctrl-left and ctrl-right arrows normally move to the start of a word
> in text editors. In TMerge it moves to one character before the start
> of the word.

I fixed that in revision 11152.
However, I took the liberty to implement a semantics slightly
different from most text editors:
Ctrl+left/right move cursor to the previous/next work boundary.
Word boundary is defined as a position where either the character
to the left of the cursor is separator, and to the right -- is not, or
vice versa.
Line break is threated as a separator too.

This has the effect of stopping both at the beginning and at the end
of each word.
Another property is that in a given line, cursor will jump between the same
set of positions when moving by words either forward or back
(try it in Visual Studio on the line with lots of special characters
to see what I mean).
Altogether I believe this implementation is better suited for editing code,
but what do others think?

Also, I found the default set of word separators insufficient (for me,
at least).
So in revision 11154 a hidden registry setting WordSeparators is introduced
which contain all non-whitespace word separators.
Default value is the same as before, but can obviously be easily changed if
there will be an agreement on this.
Space char, tabulation and line break are always considered separators
and should not be included in the setting value.
Should this setting be published in the interface?

-- 
Alexander S. Klenin
Insight Experts Ltd.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Sun Oct 28 16:17:10 2007

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.