8000 Move smalltalk word classification out of BrTextEditorModel · feenkcom/gt4pharo@e3f5762 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit e3f5762

Browse files
committed
Move smalltalk word classification out of BrTextEditorModel
1 parent 31a212c commit e3f5762

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/GToolkit-Pharo-Coder-Method/GtSmalltalkSourceCoder.class.st

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,16 @@ GtSmalltalkSourceCoder class >> doubleClickClassifier: anObject [
2323

2424
{ #category : #initialization }
2525
GtSmalltalkSourceCoder class >> initialize [
26-
WordMovementClassifier := BrTextEditorModel smalltalkWordClassifier.
27-
DoubleClickClassifier := BrTextEditorModel smalltalkWordClassifier
26+
WordMovementClassifier := self smalltalkWordClassifier.
27+
DoubleClickClassifier := self smalltalkWordClassifier
28+
]
29+
30+
{ #category : #private }
31+
GtSmalltalkSourceCoder class >> smalltalkWordClassifier [
32+
^ [ :c1 :c2 |
33+
c1 isSeparator ~= c2 isSeparator
34+
or: [ ((c1 isAlphaNumeric | (c1 = $_)) not and: [ c2 isAlphaNumeric | (c2 = $_) ])
35+
or: [ c1 isAlphaNumeric | (c1 = $_) and: [ c2 tokenish not ] ] ] ]
2836
]
2937

3038
{ #category : #accessing }

0 commit comments

Comments
 (0)
0