speedup indent/undent operation
authorClaus Gittinger <cg@exept.de>
Thu, 15 Jun 2000 17:18:35 +0200
changeset 440 d0d6753a8f3f
parent 439 060918989239
child 441 4602f96301f3
speedup indent/undent operation
keyboard.rc
--- a/keyboard.rc	Tue Jun 13 21:24:30 2000 +0200
+++ b/keyboard.rc	Thu Jun 15 17:18:35 2000 +0200
@@ -136,17 +136,24 @@
 	    ]
 	].
 	line1 notNil ifTrue:[    
-	    line1 to:line2-1 do:[:lineNr |
-		|line|
+	    self withExecuteCursorDo:[
+		line1 to:line2-1 do:[:lineNr |
+		    |line|
 
-		line := self listAt:lineNr.
-		line notNil ifTrue:[
-		    line notEmpty ifTrue:[
-			line := ''    '' , line.
-			self withoutRedrawAt:lineNr put:line.
-			self invalidateLine:lineNr.
+		    line := self listAt:lineNr.
+		    line notNil ifTrue:[
+			line notEmpty ifTrue:[
+			    line := ''    '' , line.
+			    self list at:lineNr put:line.
+			    "/ self withoutRedrawAt:lineNr put:line.
+			    "/ self invalidateLine:lineNr.
+			]
 		    ]
-		]
+		].
+		self textChanged.
+		line1 to:line2-1 do:[:lineNr |
+		    self invalidateLine:lineNr.
+		].
 	    ].
 	]
 	'.
@@ -169,19 +176,26 @@
 	    ]
 	].
 	line1 notNil ifTrue:[    
-	    line1 to:line2-1 do:[:lineNr |
-		|line|
+	    self withExecuteCursorDo:[
+		line1 to:line2-1 do:[:lineNr |
+		    |line|
 
-		line := self listAt:lineNr.
-		line notNil ifTrue:[
-		    line notEmpty ifTrue:[
-			(line startsWith:''    '') ifTrue:[
-			    line := line copyFrom:5.
-			    self withoutRedrawAt:lineNr put:line.
-			    self invalidateLine:lineNr.
+		    line := self listAt:lineNr.
+		    line notNil ifTrue:[
+			line notEmpty ifTrue:[
+			    (line startsWith:''    '') ifTrue:[
+				line := line copyFrom:5.
+				self list at:lineNr put:line.
+				"/ self withoutRedrawAt:lineNr put:line.
+				"/ self invalidateLine:lineNr.
+			    ]
 			]
 		    ]
-		]
+		].
+		self textChanged.
+		line1 to:line2-1 do:[:lineNr |
+		    self invalidateLine:lineNr.
+		].
 	    ].
 	]
 	'.