--- a/SmallSense__EditSupport.st Tue Jan 26 21:41:32 2016 +0100
+++ b/SmallSense__EditSupport.st Mon Feb 08 10:12:45 2016 +0100
@@ -149,13 +149,15 @@
!
electricDo:aBlock
- textView completionSupport notNil ifTrue:[
- (textView completionSupport)
- stopCompletionProcess;
- closeCompletionView.
+ | completionSupport |
+
+ (completionSupport := textView completionSupport) notNil ifTrue:[
+ completionSupport
+ stopCompletionProcess;
+ closeCompletionView.
].
textView hasSelection ifTrue:[
- textView undoableDo:[ textView deleteSelection ].
+ textView undoableDo:[ textView deleteSelection ].
].
textView undoableDo:[ aBlock value. ].
backspaceIsUndo := true.
@@ -251,26 +253,27 @@
!
electricInsertBlockOpenedBy:openText closedBy:closeText
- | indent lines autoIndent |
+ | completionSupport indent lines autoIndent |
- textView completionSupport notNil ifTrue:[
- (textView completionSupport)
- stopCompletionProcess;
- closeCompletionView.
+ (completionSupport := textView completionSupport) notNil ifTrue:[
+ completionSupport
+ stopCompletionProcess;
+ closeCompletionView.
].
indent := self indentAtCursorLine.
autoIndent := textView autoIndent.
textView autoIndent:false.
[
- textView
- undoableDo:[
- lines := Array
- with:openText ? ''
- with:''
- with:((String new:indent withAll:Character space) , closeText).
- self electricInsert:lines advanceCursorBy:1 @ (indent + 5)
- ].
- ] ensure:[ textView autoIndent:autoIndent ].
+ textView undoableDo:[
+ lines := Array
+ with:openText ? ''
+ with:''
+ with:((String new:indent withAll:Character space) , closeText).
+ self electricInsert:lines advanceCursorBy:1 @ (indent + 5)
+ ].
+ ] ensure:[
+ textView autoIndent:autoIndent
+ ].
"Created: / 25-07-2013 / 10:41:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 22-01-2014 / 21:20:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
@@ -359,11 +362,14 @@
| controller |
(UserPreferences current smallSenseCompletionEnabled == true) ifTrue:[
- self completionEngineClass notNil ifTrue:[
- controller := self completionControllerClass for: service textView.
- controller support: self.
- service textView completionSupport: controller.
- ].
+ self completionEngineClass notNil ifTrue:[
+ |textView|
+
+ textView := service textView.
+ controller := self completionControllerClass for: textView.
+ controller support: self.
+ textView completionSupport: controller.
+ ].
].
"Created: / 18-05-2014 / 12:40:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"