--- a/EditTextView.st Wed Dec 10 23:48:16 2014 +0000
+++ b/EditTextView.st Wed Dec 31 11:25:27 2014 +0100
@@ -1986,17 +1986,6 @@
"Created: / 8.8.2004 / 18:51:21 / janfrog"
!
-cursorToBeginOfSelection
- "Move cursor to the beginning of current selection. noop if
- there's no selection."
-
- self hasSelection ifTrue:[
- self cursorLine: selectionStartLine col: selectionStartCol
- ]
-
- "Created: / 29-08-2013 / 23:16:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
cursorToBottom
"move cursor to the last line of text (col 1)"
@@ -2071,17 +2060,6 @@
"Modified: 13.8.1997 / 15:34:02 / cg"
!
-cursorToEndOfSelection
- "Move cursor to the end of current selection. noop if
- there's no selection."
-
- self hasSelection ifTrue:[
- self cursorLine: selectionEndLine col: selectionEndCol + 1
- ]
-
- "Created: / 29-08-2013 / 23:16:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
cursorToEndOfText
"move cursor to the end of the text (behind the last character in last line)"
@@ -5025,7 +5003,7 @@
].
^self
].
- (key == #CursorUp) ifTrue:[
+ (key == #CursorUp) ifTrue:[
n := 1 + (self sensor compressKeyPressEventsWithKey:#CursorUp).
shifted ifTrue:[
self addToSelectionAfter: [ self cursorUp:n ]
@@ -5535,52 +5513,6 @@
].
!
-extendSelectionToX:x y:y setPrimarySelection: primary
- "mouse-move while button was pressed - handle selection changes"
-
- " Overwritten here to move cursor position to start/end of the
- selection, whichever changes"
-
- | oldClickLine oldClickCol newCursorLine newCursorCol |
-
- oldClickLine := clickStartLine.
- oldClickCol := clickStartCol.
-
- super extendSelectionToX:x y:y setPrimarySelection: primary.
-
- self hasSelection ifFalse: [ ^ self ].
-
- clickLine < oldClickLine ifTrue:[
- newCursorCol := selectionStartCol.
- newCursorLine := selectionStartLine.
- ] ifFalse:[
- clickLine == oldClickLine ifTrue:[
- clickCol < oldClickCol ifTrue:[
- newCursorLine := selectionStartLine.
- newCursorCol := selectionStartCol.
- ] ifFalse:[
- clickCol == oldClickCol ifTrue:[
- newCursorLine := selectionStartLine.
- newCursorCol := selectionStartCol.
- ] ifFalse:[
- newCursorLine := selectionEndLine.
- newCursorCol := selectionEndCol + 1
- ]
- ]
- ] ifFalse:[
- newCursorLine := selectionEndLine.
- newCursorCol := selectionEndCol + 1.
- ]
-
- ].
-
-
- self setCursorCol: newCursorCol.
- self setCursorLine: newCursorLine.
-
- "Created: / 25-03-2014 / 17:32:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
handleNonCommandKey:keyArg
|selStartLineBefore selStartColBefore selEndLineBefore selEndColBefore key|
@@ -8263,7 +8195,7 @@
selectFromLine:startLine col:startCol toLine:endLine col:endCol
super selectFromLine:startLine col:startCol toLine:endLine col:endCol.
- "JV: That's atctuall rubbish as then you loose the original positon
+ "JV: That's actually rubbish as then you loose the original positon
and if user wants to extend/shring the selection further, you don't know
from which end to do it!!"
"/ (selectionEndLine notNil and:[self autoMoveCursorToEndOfSelection]) ifTrue:[
@@ -8310,17 +8242,6 @@
]
!
-selectWordAtLine:line col:col
- "select the word at given line/col"
-
- super selectWordAtLine:line col:col.
- "/ Most modern editors seem to position cursor to the end of the selection
- "/ when selecting word by double-click or shortcut.
- self cursorLine: selectionEndLine col: selectionEndCol + 1.
-
- "Created: / 25-11-2013 / 14:36:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
selectWordUnderCursor
"select the word under the cursor"