next-tab: fallback to mod-8 tabs if beyond tab-list
authorClaus Gittinger <cg@exept.de>
Thu, 07 Apr 2005 20:04:20 +0200
changeset 3149 7b594d49039c
parent 3148 d47df8736106
child 3150 518f8fd0429a
next-tab: fallback to mod-8 tabs if beyond tab-list
EditTextView.st
--- a/EditTextView.st	Tue Apr 05 22:28:53 2005 +0200
+++ b/EditTextView.st	Thu Apr 07 20:04:20 2005 +0200
@@ -2593,6 +2593,11 @@
 
     wasOn := self hideCursor.
     nextTab := self nextTabAfter:cursorCol.
+    "/ fallback to mod-8 tabs if beyond tab-list.
+    nextTab <= cursorCol ifTrue:[
+        nextTab := cursorCol + 1.
+        nextTab := nextTab + (8 - (nextTab \\ 8)).
+    ].
     self insertStringAtCursor:(String new:(nextTab - cursorCol)).
     self makeCursorVisibleAndShowCursor:wasOn.
 !
@@ -6064,5 +6069,5 @@
 !EditTextView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/EditTextView.st,v 1.369 2005-02-25 13:32:15 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/EditTextView.st,v 1.370 2005-04-07 18:04:20 cg Exp $'
 ! !