--- a/keyboard.rc Wed Jul 07 14:53:18 1999 +0200
+++ b/keyboard.rc Wed Jul 07 16:10:29 1999 +0200
@@ -26,8 +26,8 @@
"/ Cmd-F98: toggle between 4 and 8 col tab setting
"/ Cmd-F96: pipe text through spelling checker and collect its output
"/ Cmd-F97: get next entry from spell-list, search and highlight it
-"/ Cmd-F95: indents selection by 4
-"/ Cmd-F94: undents selection by 4
+"/ Cmd-F95: indents selection-line by 4
+"/ Cmd-F94: undents selection-line by 4
"/
macros := Smalltalk at:#FunctionKeySequences.
@@ -115,8 +115,18 @@
"indent selected line-range
by 4 spaces (i.e. to the right)"
- self selectionStartLine notNil ifTrue:[
- self selectionStartLine to:self selectionEndLine-1 do:[:lineNr |
+ |line1 line2|
+
+ line1 := self selectionStartLine.
+ line2 := self selectionEndLine.
+ line1 isNil ifTrue:[
+ line1 := self perform:#cursorLine ifNotUnderstood:nil.
+ line1 notNil ifTrue:[
+ line2 := line1+1
+ ]
+ ].
+ line1 notNil ifTrue:[
+ line1 to:line2-1 do:[:lineNr |
|line|
line := self listAt:lineNr.
@@ -138,8 +148,18 @@
"undent selected line-range
by 4 spaces (i.e. to the left)"
- self selectionStartLine notNil ifTrue:[
- self selectionStartLine to:self selectionEndLine-1 do:[:lineNr |
+ |line1 line2|
+
+ line1 := self selectionStartLine.
+ line2 := self selectionEndLine.
+ line1 isNil ifTrue:[
+ line1 := self perform:#cursorLine ifNotUnderstood:nil.
+ line1 notNil ifTrue:[
+ line2 := line1+1
+ ]
+ ].
+ line1 notNil ifTrue:[
+ line1 to:line2-1 do:[:lineNr |
|line|
line := self listAt:lineNr.
@@ -162,8 +182,18 @@
"indent selected line-range
by 1 space (i.e. to the right)"
- self selectionStartLine notNil ifTrue:[
- self selectionStartLine to:self selectionEndLine-1 do:[:lineNr |
+ |line1 line2|
+
+ line1 := self selectionStartLine.
+ line2 := self selectionEndLine.
+ line1 isNil ifTrue:[
+ line1 := self perform:#cursorLine ifNotUnderstood:nil.
+ line1 notNil ifTrue:[
+ line2 := line1+1
+ ]
+ ].
+ line1 notNil ifTrue:[
+ line1 to:line2-1 do:[:lineNr |
|line|
line := self listAt:lineNr.
@@ -185,8 +215,18 @@
"undent selected line-range
by 1 space (i.e. to the left)"
- self selectionStartLine notNil ifTrue:[
- self selectionStartLine to:self selectionEndLine-1 do:[:lineNr |
+ |line1 line2|
+
+ line1 := self selectionStartLine.
+ line2 := self selectionEndLine.
+ line1 isNil ifTrue:[
+ line1 := self perform:#cursorLine ifNotUnderstood:nil.
+ line1 notNil ifTrue:[
+ line2 := line1+1
+ ]
+ ].
+ line1 notNil ifTrue:[
+ line1 to:line2-1 do:[:lineNr |
|line|
line := self listAt:lineNr.