Issue 64686 - Basic editor does not respect word boundaries as Basic runtime does (in particular: _ is treated differently)
Summary: Basic editor does not respect word boundaries as Basic runtime does (in parti...
Alias: None
Product: General
Classification: Code
Component: scripting (show other issues)
Version: 680m163
Hardware: All All
: P4 Trivial (vote)
Target Milestone: AOO Later
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2006-04-24 11:11 UTC by Frank Schönheit
Modified: 2013-02-07 21:59 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Note You need to log in before you can comment on or make changes to this issue.
Description Frank Schönheit 2006-04-24 11:11:02 UTC
Consider the following Basic fragment:

Sub impl_doSomething( _foo as Object )
End Sub

At runtime, this is perfectly valid Basic: Both impl_doSomething as well as _foo
are valid identifiers, so the macro runs fine.

While impl_doSomthing, for the runtime, is a single identifier, it isn't for the
editor: Place the cursor before the word, and press Ctrl-Shift-Cursor-Right.
This is expected to select the word right of the cursor position. This works
only to the extent that "impl" selected, not the while identifier.

Similar, the debugging facilities are also fooled by underscores: If, at
runtime, you place a breakpoint in the function impl_doSomething, and hover over
the "_foo" identifier, then the IDE won't display the content of "_foo". I
suppose that similar to above, only "foo" is recognized as complete word.

In short: I suggest letting the "word recognition" algorithm in the editor
recognize and respect the underscore "_" character.
Comment 1 eberlein 2006-04-25 14:39:04 UTC
Another example:
doubleclicking on a variable with an underscore (for copying purposes) or 
placing the cursor there and pressing F7 won't work.

I worked a long time with the StarOffice 5.2's IDE where the underscore was no 
problem at all.

Comment 2 eberlein 2006-04-28 07:45:45 UTC
added myself to cc
Comment 3 ab 2006-05-17 16:25:49 UTC
ab->mt: This behaviour is specified in the TestEnging, isn't it?
Or is there a mode to change the behaviour according to source editor convention.
Comment 4 malte_timmermann 2006-05-17 17:01:32 UTC
The TextEngine uses the I18N framework for word iteration since OOo 1.0.
Seems that is not the best solution when it's used as a source text editor...
Comment 5 malte_timmermann 2006-05-18 09:02:56 UTC
Target later, because it's only cursor traveling, no syntax highlight...
Comment 6 Frank Schönheit 2006-05-18 09:07:46 UTC
it's not "only cursor traveling". It's all places where it comes to identifier
recognition: double clicking, tooltip-while-hover, and the like. All those
things which make a modern IDE worth working with ;)
Comment 7 malte_timmermann 2008-03-18 18:25:39 UTC
mt->tl: TextEngine. Might need some feature to add an extra word list, to be
provided from BasicIDE.