EditTextView.st
changeset 5787 6afec9827d1c
parent 5774 3a1531b4c933
child 5795 ee8125645546
child 5809 a5cecde02b21
--- a/EditTextView.st	Fri Jul 15 13:27:03 2016 +0200
+++ b/EditTextView.st	Fri Jul 15 17:21:04 2016 +0200
@@ -1,6 +1,6 @@
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
-              All Rights Reserved
+	      All Rights Reserved
 
  This software is furnished under a license and may be used
  only in accordance with the terms of that license and with the
@@ -151,7 +151,7 @@
 copyright
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
-              All Rights Reserved
+	      All Rights Reserved
 
  This software is furnished under a license and may be used
  only in accordance with the terms of that license and with the
@@ -176,124 +176,124 @@
 
     [Instance variables:]
 
-        cursorLine              <Number>        line where cursor sits (1..)
-
-        cursorVisibleLine       <Number>        visible line where cursor sits (1..nLinesShown)
-
-        cursorCol               <Number>        col where cursor sits (1..)
-
-        cursorShown             <Boolean>       true, if cursor is currently shown
-
-        readOnly                <Boolean>       true, if text may not be edited
-
-        modifiedChannel         <ValueHolder>   holding true, if text has been modified.
-                                                cleared on accept.
-
-        acceptChannel           <ValueHolder>   holding true, if text has been accepted.
-
-        fixedSize               <Boolean>       true, if no lines may be added/removed
-
-        exceptionBlock          <Block>         block to be evaluated when readonly text is about to be modified
-                                                if it returns true, the modification will be done anyway.
-                                                if it returns anything else, the modification is not done.
-
-        cursorFgColor           <Color>         color used for cursor drawing
-        cursorBgColor           <Color>         color used for cursor drawing
-
-        cursorType              <Symbol>        how the cursor is drawn; currently implemented
-                                                are #none, #block (solid-block cursor), #ibeam
-                                                (vertical bar at insertion point)
-                                                and #caret (caret below insertion-point).
-                                                see cursorType: for an up-to-date list.
-
-        cursorTypeNoFocus       <Symbol>        like above, if view has no focus
-                                                nil means: hide the cursor.
-
-        undoAction              <Block>         block which undoes last cut, paste or replace
-                                                (not yet fully implemented)
-
-        typeOfSelection         <Symbol>        #paste, if selection created by paste, nil otherwise
-                                                this affects the next keyPress: if #paste it does not
-                                                replace; otherwise it replaces the selection.
-
-        lastCut                 <String>        last cut or replaced string
-
-        lastReplacementInfo     <LastReplacementInfo>        holds the information about the last replace action
-                                                             lastStringToReplace is the string to be replaced by lastReplacement
-                                                             lastReplacement is the string to replace lastStringToReplace
-
-        lastStringFromReplaceForNextSearch   <String>        string to be taken be the next search action 
-                                                             (cleared after a new selection)
-
-        replacing               <Boolean>       true if entered characters replace last selection
-
-        showMatchingParenthesis <Boolean>       if true, shows matching parenthesis
-                                                when entering one; this is the default.
-
-        hasKeyboardFocus        <Boolean>       true if this view has the focus
-
-        acceptAction            <Block>         accept action - evaluated passing the contents as
-                                                argument
-
-        tabMeansNextField       <Boolean>       if true, Tab is ignored as input and shifts keyboard
-                                                focus to the next field. For editTextViews, this is false
-                                                by default (i.e. tabs can be entered into the text).
-                                                For some subclasses (inputFields), this may be true.
-
-        trimBlankLines          <Boolean>       if true, trailing blanks are
-                                                removed when editing.
-                                                Default is true.
-
-        wordWrap                <Boolean>       Currently not used.
-
-        lockUpdates             <Boolean>       internal, private
-
-        prevCursorState         <Boolean>       temporary, private
-
-        cursorMovementWhenUpdating
-                                <Symbol>        defines where the cursor is to be positioned if the
-                                                model changes its value by some outside activity
-                                                (i.e. not by user input into the field).
-                                                Can be one of:
-                                                    #keep / nil     -> stay where it was
-                                                    #endOfText      -> cursor to the end
-                                                    #endOfLine      -> stay in the line, but move to end
-                                                    #beginOfText    -> cursor to the beginning
-                                                    #beginOfLine    -> stay in the line, but move to begin
-                                                The default is #beginOfText
-
-
-
-        dropTarget              <DropTarget|nil> drop operation descriptor or nil (drop disabled)
+	cursorLine              <Number>        line where cursor sits (1..)
+
+	cursorVisibleLine       <Number>        visible line where cursor sits (1..nLinesShown)
+
+	cursorCol               <Number>        col where cursor sits (1..)
+
+	cursorShown             <Boolean>       true, if cursor is currently shown
+
+	readOnly                <Boolean>       true, if text may not be edited
+
+	modifiedChannel         <ValueHolder>   holding true, if text has been modified.
+						cleared on accept.
+
+	acceptChannel           <ValueHolder>   holding true, if text has been accepted.
+
+	fixedSize               <Boolean>       true, if no lines may be added/removed
+
+	exceptionBlock          <Block>         block to be evaluated when readonly text is about to be modified
+						if it returns true, the modification will be done anyway.
+						if it returns anything else, the modification is not done.
+
+	cursorFgColor           <Color>         color used for cursor drawing
+	cursorBgColor           <Color>         color used for cursor drawing
+
+	cursorType              <Symbol>        how the cursor is drawn; currently implemented
+						are #none, #block (solid-block cursor), #ibeam
+						(vertical bar at insertion point)
+						and #caret (caret below insertion-point).
+						see cursorType: for an up-to-date list.
+
+	cursorTypeNoFocus       <Symbol>        like above, if view has no focus
+						nil means: hide the cursor.
+
+	undoAction              <Block>         block which undoes last cut, paste or replace
+						(not yet fully implemented)
+
+	typeOfSelection         <Symbol>        #paste, if selection created by paste, nil otherwise
+						this affects the next keyPress: if #paste it does not
+						replace; otherwise it replaces the selection.
+
+	lastCut                 <String>        last cut or replaced string
+
+	lastReplacementInfo     <LastReplacementInfo>        holds the information about the last replace action
+							     lastStringToReplace is the string to be replaced by lastReplacement
+							     lastReplacement is the string to replace lastStringToReplace
+
+	lastStringFromReplaceForNextSearch   <String>        string to be taken be the next search action
+							     (cleared after a new selection)
+
+	replacing               <Boolean>       true if entered characters replace last selection
+
+	showMatchingParenthesis <Boolean>       if true, shows matching parenthesis
+						when entering one; this is the default.
+
+	hasKeyboardFocus        <Boolean>       true if this view has the focus
+
+	acceptAction            <Block>         accept action - evaluated passing the contents as
+						argument
+
+	tabMeansNextField       <Boolean>       if true, Tab is ignored as input and shifts keyboard
+						focus to the next field. For editTextViews, this is false
+						by default (i.e. tabs can be entered into the text).
+						For some subclasses (inputFields), this may be true.
+
+	trimBlankLines          <Boolean>       if true, trailing blanks are
+						removed when editing.
+						Default is true.
+
+	wordWrap                <Boolean>       Currently not used.
+
+	lockUpdates             <Boolean>       internal, private
+
+	prevCursorState         <Boolean>       temporary, private
+
+	cursorMovementWhenUpdating
+				<Symbol>        defines where the cursor is to be positioned if the
+						model changes its value by some outside activity
+						(i.e. not by user input into the field).
+						Can be one of:
+						    #keep / nil     -> stay where it was
+						    #endOfText      -> cursor to the end
+						    #endOfLine      -> stay in the line, but move to end
+						    #beginOfText    -> cursor to the beginning
+						    #beginOfLine    -> stay in the line, but move to begin
+						The default is #beginOfText
+
+
+
+	dropTarget              <DropTarget|nil> drop operation descriptor or nil (drop disabled)
 
 
     userPreference values:
-        userPreferences.st80EditMode
-                                <Boolean>       if true, cursor positioning is
-                                                done as in vi or ST80; i.e.
-                                                wysiwyg mode is somewhat relaxed,
-                                                in that the cursor cannot be
-                                                positioned behind a lines end.
-                                                This is not yet completely implemented.
+	userPreferences.st80EditMode
+				<Boolean>       if true, cursor positioning is
+						done as in vi or ST80; i.e.
+						wysiwyg mode is somewhat relaxed,
+						in that the cursor cannot be
+						positioned behind a lines end.
+						This is not yet completely implemented.
     used globals:
 
-        DeleteHistory           <Text>          last 1000 lines of deleted text
-                                                (but only if this variable exists already)
+	DeleteHistory           <Text>          last 1000 lines of deleted text
+						(but only if this variable exists already)
 
     [styleSheet parameters:]
 
-        textCursorForegroundColor <Color>          cursor fg color; default: text background
-        textCursorBackgroundColor <Color>          cursor bg color; default: text foreground
-        textCursorNoFocusForegroundColor
-                                  <Color>          cursor fg color if no focus; default: cursor fg color
-        textCursorType            <Symbol>         cursor type; default:  #block
+	textCursorForegroundColor <Color>          cursor fg color; default: text background
+	textCursorBackgroundColor <Color>          cursor bg color; default: text foreground
+	textCursorNoFocusForegroundColor
+				  <Color>          cursor fg color if no focus; default: cursor fg color
+	textCursorType            <Symbol>         cursor type; default:  #block
 
     [author:]
-        Claus Gittinger
+	Claus Gittinger
 
     [see also:]
-        CodeView Workspace TextView ListView
-        EditField
+	CodeView Workspace TextView ListView
+	EditField
 "
 !
 
@@ -302,176 +302,176 @@
   non MVC operation:
 
     basic setup:
-                                                                        [exBegin]
-        |top textView|
-
-        top := StandardSystemView new.
-        top extent:300@200.
-
-        textView := EditTextView new.
-        textView origin:0.0 @ 0.0 corner:1.0 @ 1.0.
-        top addSubView:textView.
-
-        textView contents:('/etc/hosts' asFilename contentsOfEntireFile).
-
-        top open.
-                                                                        [exEnd]
+									[exBegin]
+	|top textView|
+
+	top := StandardSystemView new.
+	top extent:300@200.
+
+	textView := EditTextView new.
+	textView origin:0.0 @ 0.0 corner:1.0 @ 1.0.
+	top addSubView:textView.
+
+	textView contents:('/etc/hosts' asFilename contentsOfEntireFile).
+
+	top open.
+									[exEnd]
 
 
     with vertical scrollbar:
-                                                                        [exBegin]
-        |top scrollView textView|
-
-        top := StandardSystemView new.
-        top extent:300@200.
-
-        scrollView := ScrollableView for:EditTextView.
-        textView := scrollView scrolledView.
-        scrollView origin:0.0 @ 0.0 corner:1.0 @ 1.0.
-        top addSubView:scrollView.
-
-        textView contents:('/etc/hosts' asFilename contentsOfEntireFile).
-
-        top open.
-                                                                        [exEnd]
+									[exBegin]
+	|top scrollView textView|
+
+	top := StandardSystemView new.
+	top extent:300@200.
+
+	scrollView := ScrollableView for:EditTextView.
+	textView := scrollView scrolledView.
+	scrollView origin:0.0 @ 0.0 corner:1.0 @ 1.0.
+	top addSubView:scrollView.
+
+	textView contents:('/etc/hosts' asFilename contentsOfEntireFile).
+
+	top open.
+									[exEnd]
 
 
     with horizontal & vertical scrollbars:
-                                                                        [exBegin]
-        |top scrollView textView|
-
-        top := StandardSystemView new.
-        top extent:300@200.
-
-        scrollView := HVScrollableView for:EditTextView.
-        textView := scrollView scrolledView.
-        scrollView origin:0.0 @ 0.0 corner:1.0 @ 1.0.
-        top addSubView:scrollView.
-
-        textView contents:('/etc/hosts' asFilename contentsOfEntireFile).
-
-        top open.
-                                                                        [exEnd]
+									[exBegin]
+	|top scrollView textView|
+
+	top := StandardSystemView new.
+	top extent:300@200.
+
+	scrollView := HVScrollableView for:EditTextView.
+	textView := scrollView scrolledView.
+	scrollView origin:0.0 @ 0.0 corner:1.0 @ 1.0.
+	top addSubView:scrollView.
+
+	textView contents:('/etc/hosts' asFilename contentsOfEntireFile).
+
+	top open.
+									[exEnd]
 
 
     set the action for accept:
-                                                                        [exBegin]
-        |top textView|
-
-        top := StandardSystemView new.
-        top extent:300@200.
-
-        textView := EditTextView new.
-        textView origin:0.0 @ 0.0 corner:1.0 @ 1.0.
-        top addSubView:textView.
-
-        textView contents:('/etc/hosts' asFilename contentsOfEntireFile).
-        textView acceptAction:[:contents |
-                                Transcript showCR:'will not overwrite the file with:'.
-                                Transcript showCR:contents asString
-                              ].
-        top open.
-                                                                        [exEnd]
+									[exBegin]
+	|top textView|
+
+	top := StandardSystemView new.
+	top extent:300@200.
+
+	textView := EditTextView new.
+	textView origin:0.0 @ 0.0 corner:1.0 @ 1.0.
+	top addSubView:textView.
+
+	textView contents:('/etc/hosts' asFilename contentsOfEntireFile).
+	textView acceptAction:[:contents |
+				Transcript showCR:'will not overwrite the file with:'.
+				Transcript showCR:contents asString
+			      ].
+	top open.
+									[exEnd]
 
 
 
     non-string (text) items:
-                                                                        [exBegin]
-        |top textView list|
-
-        list := '/etc/hosts' asFilename contentsOfEntireFile asStringCollection.
-        1 to:list size by:2 do:[:nr |
-            list at:nr put:(Text string:(list at:nr)
-                                 emphasis:(Array with:#bold with:(#color->Color red)))
-        ].
-
-        top := StandardSystemView new.
-        top extent:300@200.
-
-        textView := EditTextView new.
-        textView origin:0.0 @ 0.0 corner:1.0 @ 1.0.
-        top addSubView:textView.
-
-        textView contents:list.
-        top open.
-                                                                        [exEnd]
+									[exBegin]
+	|top textView list|
+
+	list := '/etc/hosts' asFilename contentsOfEntireFile asStringCollection.
+	1 to:list size by:2 do:[:nr |
+	    list at:nr put:(Text string:(list at:nr)
+				 emphasis:(Array with:#bold with:(#color->Color red)))
+	].
+
+	top := StandardSystemView new.
+	top extent:300@200.
+
+	textView := EditTextView new.
+	textView origin:0.0 @ 0.0 corner:1.0 @ 1.0.
+	top addSubView:textView.
+
+	textView contents:list.
+	top open.
+									[exEnd]
 
 
 
   MVC operation:
     (the examples model here is a plug simulating a real model;
      real world applications would not use a plug ..)
-                                                                        [exBegin]
-        |top textView model|
-
-        model := Plug new.
-        model respondTo:#accepted:
-                   with:[:newContents |
-                                Transcript showCR:'will not overwrite the file with:'.
-                                Transcript showCR:newContents asString
-                        ].
-        model respondTo:#getList
-                   with:['/etc/hosts' asFilename contentsOfEntireFile].
-
-
-        top := StandardSystemView new.
-        top extent:300@200.
-
-        textView := EditTextView new.
-        textView origin:0.0 @ 0.0 corner:1.0 @ 1.0.
-        top addSubView:textView.
-
-        textView listMessage:#getList;
-                 model:model;
-                 changeMessage:#accepted:;
-                 aspect:#list.
-        top open.
-                                                                        [exEnd]
+									[exBegin]
+	|top textView model|
+
+	model := Plug new.
+	model respondTo:#accepted:
+		   with:[:newContents |
+				Transcript showCR:'will not overwrite the file with:'.
+				Transcript showCR:newContents asString
+			].
+	model respondTo:#getList
+		   with:['/etc/hosts' asFilename contentsOfEntireFile].
+
+
+	top := StandardSystemView new.
+	top extent:300@200.
+
+	textView := EditTextView new.
+	textView origin:0.0 @ 0.0 corner:1.0 @ 1.0.
+	top addSubView:textView.
+
+	textView listMessage:#getList;
+		 model:model;
+		 changeMessage:#accepted:;
+		 aspect:#list.
+	top open.
+									[exEnd]
 
 
     two textViews on the same model:
-                                                                        [exBegin]
-        |top1 textView1 top2 textView2 model currentContents|
-
-        model := Plug new.
-        model respondTo:#accepted:
-                   with:[:newContents |
-                                Transcript showCR:'accepted:'.
-                                Transcript showCR:newContents asString.
-                                currentContents := newContents.
-                                model changed:#contents
-                        ].
-        model respondTo:#getList
-                   with:[Transcript showCR:'query'.
-                         currentContents].
-
-
-        top1 := StandardSystemView new.
-        top1 extent:300@200.
-
-        textView1 := EditTextView new.
-        textView1 origin:0.0 @ 0.0 corner:1.0 @ 1.0.
-        top1 addSubView:textView1.
-
-        textView1 listMessage:#getList;
-                  model:model;
-                  aspect:#contents;
-                  changeMessage:#accepted:.
-        top1 open.
-
-        top2 := StandardSystemView new.
-        top2 extent:300@200.
-
-        textView2 := EditTextView new.
-        textView2 origin:0.0 @ 0.0 corner:1.0 @ 1.0.
-        top2 addSubView:textView2.
-
-        textView2 listMessage:#getList;
-                  model:model;
-                  aspect:#contents;
-                  changeMessage:#accepted:.
-        top2 open.
-                                                                        [exEnd]
+									[exBegin]
+	|top1 textView1 top2 textView2 model currentContents|
+
+	model := Plug new.
+	model respondTo:#accepted:
+		   with:[:newContents |
+				Transcript showCR:'accepted:'.
+				Transcript showCR:newContents asString.
+				currentContents := newContents.
+				model changed:#contents
+			].
+	model respondTo:#getList
+		   with:[Transcript showCR:'query'.
+			 currentContents].
+
+
+	top1 := StandardSystemView new.
+	top1 extent:300@200.
+
+	textView1 := EditTextView new.
+	textView1 origin:0.0 @ 0.0 corner:1.0 @ 1.0.
+	top1 addSubView:textView1.
+
+	textView1 listMessage:#getList;
+		  model:model;
+		  aspect:#contents;
+		  changeMessage:#accepted:.
+	top1 open.
+
+	top2 := StandardSystemView new.
+	top2 extent:300@200.
+
+	textView2 := EditTextView new.
+	textView2 origin:0.0 @ 0.0 corner:1.0 @ 1.0.
+	top2 addSubView:textView2.
+
+	textView2 listMessage:#getList;
+		  model:model;
+		  aspect:#contents;
+		  changeMessage:#accepted:.
+	top2 open.
+									[exEnd]
 "
 ! !
 
@@ -516,10 +516,10 @@
     "extract values from the styleSheet and cache them in class variables"
 
     <resource: #style (#'textCursor.foregroundColor' #'textCursor.backgroundColor'
-                       #'textCursor.noFocusForegroundColor'
-                       #'textCursor.type'
-                       #'textCursor.typeNoFocus'
-                       #'editText.st80Mode')>
+		       #'textCursor.noFocusForegroundColor'
+		       #'textCursor.type'
+		       #'textCursor.typeNoFocus'
+		       #'editText.st80Mode')>
 
     DefaultCursorForegroundColor := StyleSheet colorAt:'textCursor.foregroundColor'.
     DefaultCursorBackgroundColor := StyleSheet colorAt:'textCursor.backgroundColor'.
@@ -551,165 +551,165 @@
 
     ^
      #(FullSpec
-        name: searchReplaceDialogSpec
-        window:
+	name: searchReplaceDialogSpec
+	window:
        (WindowSpec
-          label: 'String Search and Replace'
-          name: 'String Search and Replace'
-          min: (Point 283 196)
-          max: (Point 283 196)
-          bounds: (Rectangle 0 0 279 192)
-        )
-        component:
+	  label: 'String Search and Replace'
+	  name: 'String Search and Replace'
+	  min: (Point 283 196)
+	  max: (Point 283 196)
+	  bounds: (Rectangle 0 0 279 192)
+	)
+	component:
        (SpecCollection
-          collection: (
-           (LabelSpec
-              label: 'Search Pattern:'
-              name: 'label'
-              layout: (LayoutFrame 1 0.0 3 0 -1 1.0 20 0)
-              level: 0
-              translateLabel: true
-              adjust: left
-            )
-           (ComboBoxSpec
-              name: 'patternComboBox'
-              layout: (LayoutFrame 3 0.0 26 0 -3 1.0 48 0)
-              tabable: true
-              model: searchPattern
-              immediateAccept: false
-              acceptOnLeave: true
-              acceptOnReturn: true
-              acceptOnTab: true
-              acceptOnLostFocus: true
-              acceptOnPointerLeave: false
-              autoSelectInitialText: true
-              comboList: patternList
-            )
-           (ComboBoxSpec
-              name: 'replaceComboBox'
-              layout: (LayoutFrame 3 0.0 76 0 -3 1.0 98 0)
-              tabable: true
-              model: replacePattern
-              immediateAccept: false
-              acceptOnLeave: true
-              acceptOnReturn: true
-              acceptOnTab: true
-              acceptOnLostFocus: true
-              acceptOnPointerLeave: false
-              autoSelectInitialText: true
-              comboList: patternList
-            )
-           (CheckBoxSpec
-              label: 'Ignore Case'
-              name: 'ignoreCaseCheckBox'
-              layout: (LayoutFrame 3 0.0 107 0 -3 1.0 130 0)
-              level: 0
-              tabable: true
-              model: ignoreCase
-              translateLabel: true
-            )
-           (VariableVerticalPanelSpec
-              name: 'VariableVerticalPanel1'
-              layout: (LayoutFrame 0 0 -64 1 0 1 -4 1)
-              component:
-             (SpecCollection
-                collection: (
-                 (HorizontalPanelViewSpec
-                    name: 'HorizontalPanel1'
-                    level: 0
-                    horizontalLayout: fitSpace
-                    verticalLayout: center
-                    horizontalSpace: 3
-                    verticalSpace: 3
-                    ignoreInvisibleComponents: true
-                    reverseOrderIfOKAtLeft: true
-                    component:
-                   (SpecCollection
-                      collection: (
-                       (ActionButtonSpec
-                          label: 'Replace'
-                          name: 'replaceButton'
-                          level: 2
-                          translateLabel: true
-                          tabable: true
-                          model: replaceAction
-                          extent: (Point 134 21)
-                        )
-                       (ActionButtonSpec
-                          label: 'Replace All'
-                          name: 'replaceAllButton'
-                          level: 2
-                          borderWidth: 1
-                          translateLabel: true
-                          tabable: true
-                          model: replaceAllAction
-                          extent: (Point 134 21)
-                        )
-                       )
-
-                    )
-                  )
-                 (HorizontalPanelViewSpec
-                    name: 'horizontalPanelView'
-                    level: 0
-                    horizontalLayout: fitSpace
-                    verticalLayout: center
-                    horizontalSpace: 3
-                    verticalSpace: 3
-                    ignoreInvisibleComponents: true
-                    reverseOrderIfOKAtLeft: true
-                    component:
-                   (SpecCollection
-                      collection: (
-                       (ActionButtonSpec
-                          label: 'Cancel'
-                          name: 'cancelButton'
-                          level: 2
-                          translateLabel: true
-                          tabable: true
-                          model: cancel
-                          extent: (Point 88 21)
-                        )
-                       (ActionButtonSpec
-                          label: 'Prev'
-                          name: 'prevButton'
-                          level: 2
-                          translateLabel: true
-                          tabable: true
-                          model: prevAction
-                          extent: (Point 89 21)
-                        )
-                       (ActionButtonSpec
-                          label: 'Next'
-                          name: 'nextButton'
-                          level: 2
-                          borderWidth: 1
-                          translateLabel: true
-                          tabable: true
-                          model: nextAction
-                          isDefault: true
-                          extent: (Point 88 21)
-                        )
-                       )
-
-                    )
-                  )
-                 )
-
-              )
-              handles: (Any 0.5 1.0)
-            )
-           (LabelSpec
-              label: 'Replace By:'
-              name: 'ReplaceLabel'
-              layout: (LayoutFrame 1 0.0 53 0 -1 1.0 70 0)
-              level: 0
-              translateLabel: true
-              adjust: left
-            )
-           )
-
-        )
+	  collection: (
+	   (LabelSpec
+	      label: 'Search Pattern:'
+	      name: 'label'
+	      layout: (LayoutFrame 1 0.0 3 0 -1 1.0 20 0)
+	      level: 0
+	      translateLabel: true
+	      adjust: left
+	    )
+	   (ComboBoxSpec
+	      name: 'patternComboBox'
+	      layout: (LayoutFrame 3 0.0 26 0 -3 1.0 48 0)
+	      tabable: true
+	      model: searchPattern
+	      immediateAccept: false
+	      acceptOnLeave: true
+	      acceptOnReturn: true
+	      acceptOnTab: true
+	      acceptOnLostFocus: true
+	      acceptOnPointerLeave: false
+	      autoSelectInitialText: true
+	      comboList: patternList
+	    )
+	   (ComboBoxSpec
+	      name: 'replaceComboBox'
+	      layout: (LayoutFrame 3 0.0 76 0 -3 1.0 98 0)
+	      tabable: true
+	      model: replacePattern
+	      immediateAccept: false
+	      acceptOnLeave: true
+	      acceptOnReturn: true
+	      acceptOnTab: true
+	      acceptOnLostFocus: true
+	      acceptOnPointerLeave: false
+	      autoSelectInitialText: true
+	      comboList: patternList
+	    )
+	   (CheckBoxSpec
+	      label: 'Ignore Case'
+	      name: 'ignoreCaseCheckBox'
+	      layout: (LayoutFrame 3 0.0 107 0 -3 1.0 130 0)
+	      level: 0
+	      tabable: true
+	      model: ignoreCase
+	      translateLabel: true
+	    )
+	   (VariableVerticalPanelSpec
+	      name: 'VariableVerticalPanel1'
+	      layout: (LayoutFrame 0 0 -64 1 0 1 -4 1)
+	      component:
+	     (SpecCollection
+		collection: (
+		 (HorizontalPanelViewSpec
+		    name: 'HorizontalPanel1'
+		    level: 0
+		    horizontalLayout: fitSpace
+		    verticalLayout: center
+		    horizontalSpace: 3
+		    verticalSpace: 3
+		    ignoreInvisibleComponents: true
+		    reverseOrderIfOKAtLeft: true
+		    component:
+		   (SpecCollection
+		      collection: (
+		       (ActionButtonSpec
+			  label: 'Replace'
+			  name: 'replaceButton'
+			  level: 2
+			  translateLabel: true
+			  tabable: true
+			  model: replaceAction
+			  extent: (Point 134 21)
+			)
+		       (ActionButtonSpec
+			  label: 'Replace All'
+			  name: 'replaceAllButton'
+			  level: 2
+			  borderWidth: 1
+			  translateLabel: true
+			  tabable: true
+			  model: replaceAllAction
+			  extent: (Point 134 21)
+			)
+		       )
+
+		    )
+		  )
+		 (HorizontalPanelViewSpec
+		    name: 'horizontalPanelView'
+		    level: 0
+		    horizontalLayout: fitSpace
+		    verticalLayout: center
+		    horizontalSpace: 3
+		    verticalSpace: 3
+		    ignoreInvisibleComponents: true
+		    reverseOrderIfOKAtLeft: true
+		    component:
+		   (SpecCollection
+		      collection: (
+		       (ActionButtonSpec
+			  label: 'Cancel'
+			  name: 'cancelButton'
+			  level: 2
+			  translateLabel: true
+			  tabable: true
+			  model: cancel
+			  extent: (Point 88 21)
+			)
+		       (ActionButtonSpec
+			  label: 'Prev'
+			  name: 'prevButton'
+			  level: 2
+			  translateLabel: true
+			  tabable: true
+			  model: prevAction
+			  extent: (Point 89 21)
+			)
+		       (ActionButtonSpec
+			  label: 'Next'
+			  name: 'nextButton'
+			  level: 2
+			  borderWidth: 1
+			  translateLabel: true
+			  tabable: true
+			  model: nextAction
+			  isDefault: true
+			  extent: (Point 88 21)
+			)
+		       )
+
+		    )
+		  )
+		 )
+
+	      )
+	      handles: (Any 0.5 1.0)
+	    )
+	   (LabelSpec
+	      label: 'Replace By:'
+	      name: 'ReplaceLabel'
+	      layout: (LayoutFrame 1 0.0 53 0 -1 1.0 70 0)
+	      level: 0
+	      translateLabel: true
+	      adjust: left
+	    )
+	   )
+
+	)
       )
 
     "Modified: / 11-10-2006 / 21:05:09 / cg"
@@ -766,7 +766,7 @@
     line := self lineOfCharacterPosition:aCharacterPosition.
     col := aCharacterPosition - (self characterPositionOfLine:line col:1) + 1.
     col < 1 ifTrue:[
-        col := 1
+	col := 1
     ].
     self insertString:aString atLine:line col:col.
 
@@ -849,8 +849,8 @@
     "/ Applications should set it explictly, however, to make it behavinh like
     "/ CodeView2, I kept fetching code here for now.
     ^((app := self topView application) notNil and:[app respondsTo: #codeAspect])
-        ifTrue:[app codeAspect]
-        ifFalse:[nil]
+	ifTrue:[app codeAspect]
+	ifFalse:[nil]
 
     "Created: / 27-09-2013 / 09:53:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
@@ -932,10 +932,10 @@
     lNr := self cursorLine.
     line := self listAt:lNr.
     line notEmptyOrNil ifTrue:[
-        doSelect ifTrue:[
-            self selectLine:lNr.
-        ].
-        ^ line
+	doSelect ifTrue:[
+	    self selectLine:lNr.
+	].
+	^ line
     ].
 
     ^ nil
@@ -1021,11 +1021,11 @@
     "return what is be done with the cursor,
      when I get a new text (via the model or the #contents/#list)
      Allowed arguments are:
-        #keep / nil     -> stay where it was
-        #endOfText      -> position cursor to the end
-        #beginOfText    -> position cursor to the beginning
-        #endOfLine      -> position cursor to the current lines end
-        #beginOfLine    -> position cursor to the current lines start
+	#keep / nil     -> stay where it was
+	#endOfText      -> position cursor to the end
+	#beginOfText    -> position cursor to the beginning
+	#endOfLine      -> position cursor to the current lines end
+	#beginOfLine    -> position cursor to the current lines start
      The default is #beginOfText.
      This may be useful for fields which get new values assigned from
      the program (i.e. not from the user)"
@@ -1039,11 +1039,11 @@
     "define what should be done with the cursor,
      when I get a new text (via the model or the #contents/#list)
      Allowed arguments are:
-        #keep / nil     -> stay where it was
-        #endOfText      -> position cursor to the end
-        #beginOfText    -> position cursor to the beginning
-        #endOfLine      -> position cursor to the current lines end
-        #beginOfLine    -> position cursor to the current lines start
+	#keep / nil     -> stay where it was
+	#endOfText      -> position cursor to the end
+	#beginOfText    -> position cursor to the beginning
+	#endOfLine      -> position cursor to the current lines end
+	#beginOfLine    -> position cursor to the current lines start
      The default is #beginOfText.
      This may be useful for fields which get new values assigned from
      the program (i.e. not from the user)"
@@ -1099,10 +1099,10 @@
 
     self obsoleteMethodWarning:'use #readOnly:'.
     readOnly == true ifFalse:[
-        readOnly := true.
-        (menu := self middleButtonMenu) notNil ifTrue:[
-            menu disableAll:#(cut paste replace indent)
-        ]
+	readOnly := true.
+	(menu := self middleButtonMenu) notNil ifTrue:[
+	    menu disableAll:#(cut paste replace indent)
+	]
     ]
 
     "Modified: 14.2.1997 / 17:35:24 / cg"
@@ -1116,8 +1116,8 @@
 
 insertModeHolder
     ^ BlockValue
-        with:[:m | m isInsertMode]
-        argument:(editMode).
+	with:[:m | m isInsertMode]
+	argument:(editMode).
 
     "Modified: / 08-03-2007 / 22:58:37 / cg"
 !
@@ -1144,14 +1144,14 @@
     "a valueHolder, which contains 'L' (learnMode), I (insertMode) or empty"
 
     ^ BlockValue
-        with:[:e :l |
-            self isReadOnly ifTrue:[
-                ''
-            ] ifFalse:[
-                l ifTrue:[ 'L' allBold withColor:#red]
-                  ifFalse:[ e infoPrintString]]]
-        argument:(self editModeHolder)
-        argument:(self learnModeHolder).
+	with:[:e :l |
+	    self isReadOnly ifTrue:[
+		''
+	    ] ifFalse:[
+		l ifTrue:[ 'L' allBold withColor:#red]
+		  ifFalse:[ e infoPrintString]]]
+	argument:(self editModeHolder)
+	argument:(self learnModeHolder).
 
     "Modified: / 08-03-2007 / 22:58:59 / cg"
 !
@@ -1262,7 +1262,7 @@
      this is not undoably, unless you care for yourself"
 
     (self at:lineNr) = aLine ifFalse:[
-        super at:lineNr put:aLine.
+	super at:lineNr put:aLine.
     ].
 !
 
@@ -1274,8 +1274,8 @@
 
     oldLine := (self at:lineNr) ? ''.
     (oldLine sameStringAndEmphasisAs: (aLine? '')) ifFalse:[
-        super at:lineNr put:aLine.
-        self textChanged
+	super at:lineNr put:aLine.
+	self textChanged
     ].
 !
 
@@ -1298,7 +1298,7 @@
 characterUnderCursor
     "return the character under the cursor - space if beyond line.
      For non-block cursors, this is the character immediately to the right
-     of the insertion-bar or caret. 
+     of the insertion-bar or caret.
      For block cursors, this is the highlighted cursor-character"
 
     ^ self characterAtLine:cursorLine col:cursorCol
@@ -1328,7 +1328,7 @@
 
     super contents:something.
     keepUndoHistory ifFalse:[
-        undoSupport resetHistories.
+	undoSupport resetHistories.
     ].
 !
 
@@ -1338,8 +1338,8 @@
     list isNil ifTrue:[^ ''].
     self removeTrailingBlankLines.
     ^ (list collect:[:each | each isNil ifTrue:['']
-                                        ifFalse:[each string]
-                    ]) asStringWithCRs
+					ifFalse:[each string]
+		    ]) asStringWithCRs
 !
 
 contentsAsStringWithTabs
@@ -1349,10 +1349,10 @@
 
     list isNil ifTrue:[^ ''].
     self removeTrailingBlankLines.
-    ^ (list collect:[:each | 
-        each isNil 
-            ifTrue:['']
-            ifFalse:[each string withTabs]
+    ^ (list collect:[:each |
+	each isNil
+	    ifTrue:['']
+	    ifFalse:[each string withTabs]
        ]) asStringWithCRs
 !
 
@@ -1378,13 +1378,13 @@
 
 cursorLineAndColumnLabelHolder
     "return a valueHolder for the cursors line and column as an info string
-     of the form 'line : col'. 
+     of the form 'line : col'.
      This can be used directly as a model for a GUI label showing the cursor position (eg in the lower right)"
 
     ^ BlockValue
-        with:[:l :c | '%1 : %2' bindWith:l with:c]
-        argument:self cursorLineHolder
-        argument:self cursorColHolder
+	with:[:l :c | '%1 : %2' bindWith:l with:c]
+	argument:self cursorLineHolder
+	argument:self cursorColHolder
 !
 
 cursorLineHolder
@@ -1402,7 +1402,7 @@
 
     line := ((self at:cursorLine) ? '') string.
     line size < (cursorCol-1) ifTrue:[
-        ^ line paddedTo:(cursorCol-1)
+	^ line paddedTo:(cursorCol-1)
     ].
     ^ line copyTo:(cursorCol-1)
 !
@@ -1421,19 +1421,19 @@
 
     (cursorMovementWhenUpdating == #endOfText
     or:[cursorMovementWhenUpdating == #end]) ifTrue:[
-        ^ self cursorToEndOfText
+	^ self cursorToEndOfText
     ].
 
     (cursorMovementWhenUpdating == #endOfLine) ifTrue:[
-        ^ self cursorLine:prevCursorLine col:(self listAt:cursorLine) size + 1.
+	^ self cursorLine:prevCursorLine col:(self listAt:cursorLine) size + 1.
     ].
 
     (cursorMovementWhenUpdating == #beginOfText
     or:[cursorMovementWhenUpdating == #begin]) ifTrue:[
-        ^ self cursorHome
+	^ self cursorHome
     ].
     (cursorMovementWhenUpdating == #beginOfLine) ifTrue:[
-        ^ self cursorLine:prevCursorLine col:1.
+	^ self cursorLine:prevCursorLine col:1.
     ].
 
     "/ default: stay where it was
@@ -1441,7 +1441,7 @@
 !
 
 setContents:something
-    "replace the whole contents by something new 
+    "replace the whole contents by something new
      AND clear the remembered undo actions"
 
     |selType|
@@ -1461,14 +1461,14 @@
     |point|
 
     cursorVisibleLine isNil ifTrue:[
-        "/ take the end of the selection, if any
-        (selectionStartLine notNil 
-            and:[ self listLineIsVisible:selectionEndLine ])
-        ifTrue:[
-            ^ self xOfCol:selectionEndCol inVisibleLine:selectionEndLine.
-        ].
-
-"/        point := device 
+	"/ take the end of the selection, if any
+	(selectionStartLine notNil
+	    and:[ self listLineIsVisible:selectionEndLine ])
+	ifTrue:[
+	    ^ self xOfCol:selectionEndCol inVisibleLine:selectionEndLine.
+	].
+
+"/        point := device
 "/                    translatePoint:(device pointerPosition)
 "/                    fromView:nil
 "/                    toView:self.
@@ -1476,7 +1476,7 @@
 "/            ^ point x
 "/        ].
 "/        ^ 0
-        ^ nil
+	^ nil
     ].
     ^self xOfCol:cursorCol inVisibleLine:cursorVisibleLine.
 
@@ -1499,8 +1499,8 @@
 cursorType
     "return the style of the text cursor.
      Currently, supported are: #none
-                               #block, #frame, #ibeam, #caret, #solidCaret
-                               #bigCaret and #bigSolidCaret"
+			       #block, #frame, #ibeam, #caret, #solidCaret
+			       #bigCaret and #bigSolidCaret"
 
     ^ cursorType
 
@@ -1510,8 +1510,8 @@
 cursorType:aCursorTypeSymbol
     "set the style of the text cursor.
      Currently, supported are: #none
-                               #block, #frame, #ibeam, #caret, #solidCaret
-                               #bigCaret and #bigSolidCaret"
+			       #block, #frame, #ibeam, #caret, #solidCaret
+			       #bigCaret and #bigSolidCaret"
 
     cursorType := aCursorTypeSymbol.
 
@@ -1557,11 +1557,11 @@
      changeMessage."
 
     acceptEnabled == false ifTrue:[
-        self beep.
-        ^ self
+	self beep.
+	^ self
     ].
     (disableIfInvisible == true and:[self reallyRealized not]) ifTrue:[
-        ^ self
+	^ self
     ].
 
     lockUpdates := true.
@@ -1570,10 +1570,10 @@
     "/ ST-80 way of doing it
     "/
     model notNil ifTrue:[
-        self sendChangeMessage:changeMsg with:self argForChangeMessage.
-        acceptChannel notNil ifTrue:[
-            acceptChannel value:true withoutNotifying:self.
-        ].    
+	self sendChangeMessage:changeMsg with:self argForChangeMessage.
+	acceptChannel notNil ifTrue:[
+	    acceptChannel value:true withoutNotifying:self.
+	].
     ].
 
     "/
@@ -1583,7 +1583,7 @@
     "/ - not with the actual string
     "/
     acceptAction notNil ifTrue:[
-        acceptAction value:self list
+	acceptAction value:self list
     ].
 
     lockUpdates := false.
@@ -1609,8 +1609,8 @@
      ignore updates from my own change
     "
     lockUpdates ifTrue:[
-        lockUpdates := false.
-        ^ self
+	lockUpdates := false.
+	^ self
     ].
     super getListFromModel.
     undoSupport resetHistories.
@@ -1618,16 +1618,16 @@
     "/ validate the cursorLine
     (cursorLine notNil
      and:[ cursorLine > list size ]) ifTrue:[
-        self cursorLine:list size + 1 col:1
+	self cursorLine:list size + 1 col:1
     ].
 !
 
 update:something with:aParameter from:changedObject
     changedObject == acceptChannel ifTrue:[
-        acceptChannel value == true ifTrue:[
-            self accept.
-        ].
-        ^ self.
+	acceptChannel value == true ifTrue:[
+	    self accept.
+	].
+	^ self.
     ].
     super update:something with:aParameter from:changedObject
 
@@ -1644,9 +1644,9 @@
 
     self checkForExistingLine:(cursorLine + 1).
     cursorVisibleLine notNil ifTrue:[
-        nFullLinesShown notNil ifTrue:[
-            (cursorVisibleLine >= nFullLinesShown) ifTrue:[self scrollDown]
-        ]
+	nFullLinesShown notNil ifTrue:[
+	    (cursorVisibleLine >= nFullLinesShown) ifTrue:[self scrollDown]
+	]
     ].
 
     wasOn := self hideCursor.
@@ -1690,10 +1690,10 @@
 
     "/ cursor beyond text ?
     cursorLine > list size ifTrue:[
-        wasOn := self hideCursor.
-        self setValidatedCursorLine:(list size + 1) col:cursorCol.
-        self makeCursorVisibleAndShowCursor:wasOn.
-        self beep.
+	wasOn := self hideCursor.
+	self setValidatedCursorLine:(list size + 1) col:cursorCol.
+	self makeCursorVisibleAndShowCursor:wasOn.
+	self beep.
     ].
 
     "Modified: / 10.6.1998 / 17:00:23 / cg"
@@ -1705,30 +1705,30 @@
     |wasOn nv nL|
 
     (nL := cursorLine) isNil ifTrue:[
-        nL := firstLineShown
+	nL := firstLineShown
     ].
 
     self st80EditMode ifTrue:[
-        nL == list size ifTrue:[
-            wasOn := self hideCursor.
-            self setValidatedCursorLine:(list size) col:(self listAt:list size) size + 1.
-            self makeCursorVisibleAndShowCursor:wasOn.
-            self beep.
-            ^ self.
-        ]
+	nL == list size ifTrue:[
+	    wasOn := self hideCursor.
+	    self setValidatedCursorLine:(list size) col:(self listAt:list size) size + 1.
+	    self makeCursorVisibleAndShowCursor:wasOn.
+	    self beep.
+	    ^ self.
+	]
     ].
 
     cursorVisibleLine notNil ifTrue:[
-        wasOn := self hideCursor.
-        nv := cursorVisibleLine + n - 1.
-        (nv >= nFullLinesShown) ifTrue:[
-            self scrollDown:(nv - nFullLinesShown + 1)
-        ].
-        self setValidatedCursorLine:(cursorLine + n) col:cursorCol.
-        self makeCursorVisibleAndShowCursor:wasOn.
+	wasOn := self hideCursor.
+	nv := cursorVisibleLine + n - 1.
+	(nv >= nFullLinesShown) ifTrue:[
+	    self scrollDown:(nv - nFullLinesShown + 1)
+	].
+	self setValidatedCursorLine:(cursorLine + n) col:cursorCol.
+	self makeCursorVisibleAndShowCursor:wasOn.
     ] ifFalse:[
-        self setValidatedCursorLine:(nL + n) col:cursorCol.
-        self makeCursorVisible.
+	self setValidatedCursorLine:(nL + n) col:cursorCol.
+	self makeCursorVisible.
     ].
 
     "Modified: / 10.6.1998 / 16:59:17 / cg"
@@ -1754,14 +1754,14 @@
     "move cursor to left"
 
     (cursorCol ~~ 1) ifTrue:[
-        self cursorCol:(cursorCol - 1)
+	self cursorCol:(cursorCol - 1)
     ] ifFalse:[
-        cursorLine ~~ 1 ifTrue:[
-            self st80EditMode ifTrue:[
-                self cursorUp.
-                self cursorToEndOfLine.
-           ]
-        ]
+	cursorLine ~~ 1 ifTrue:[
+	    self st80EditMode ifTrue:[
+		self cursorUp.
+		self cursorToEndOfLine.
+	   ]
+	]
     ]
 
     "Modified: / 23.1.1998 / 12:37:13 / cg"
@@ -1771,7 +1771,7 @@
     "move cursor to left"
 
     n timesRepeat:[
-        self cursorLeft
+	self cursorLeft
     ].
 !
 
@@ -1792,21 +1792,21 @@
     self setValidatedCursorLine:line.
 
     (col < 1) ifTrue:[
-        newCol := 1
+	newCol := 1
     ] ifFalse:[
-        newCol := col.
+	newCol := col.
     ].
     self st80EditMode ifTrue:[
-        (cursorLine == list size
-        and:[cursorLine ~~ line]) ifTrue:[
-            newCol := (self listAt:(list size)) size + 1.
-        ]
+	(cursorLine == list size
+	and:[cursorLine ~~ line]) ifTrue:[
+	    newCol := (self listAt:(list size)) size + 1.
+	]
     ].
     self setValidatedCursorCol:newCol.
     makeVisibleBoolean ifTrue:[
-        self makeCursorVisibleAndShowCursor:wasOn.
+	self makeCursorVisibleAndShowCursor:wasOn.
     ] ifFalse:[
-        wasOn ifTrue:[self showCursor]
+	wasOn ifTrue:[self showCursor]
     ].
 
     "Modified: / 20.6.1998 / 18:19:06 / cg"
@@ -1842,13 +1842,13 @@
     |l|
 
     self st80EditMode ifTrue:[
-        l := (self listAt:cursorLine).
-        cursorCol >= (l size + 1) ifTrue:[
-            cursorLine <= list size ifTrue:[
-                self cursorReturn:false. "/ no autoindent
-            ].
-            ^ self
-        ]
+	l := (self listAt:cursorLine).
+	cursorCol >= (l size + 1) ifTrue:[
+	    cursorLine <= list size ifTrue:[
+		self cursorReturn:false. "/ no autoindent
+	    ].
+	    ^ self
+	]
     ].
     self cursorCol:(cursorCol + 1)
 
@@ -1859,7 +1859,7 @@
     "move cursor to right"
 
     n timesRepeat:[
-        self cursorRight
+	self cursorRight
     ].
 !
 
@@ -1870,16 +1870,16 @@
     |oldState|
 
     aBoolean == cursorShown ifTrue:[
-        ^ cursorShown
+	^ cursorShown
     ].
     oldState := cursorShown.
 
     aBoolean ifTrue:[
-        self drawCursor.
+	self drawCursor.
     ] ifFalse:[
-        (cursorShown and:[shown]) ifTrue: [
-            self undrawCursor.
-        ].
+	(cursorShown and:[shown]) ifTrue: [
+	    self undrawCursor.
+	].
     ].
     cursorShown := aBoolean.
 
@@ -1903,9 +1903,9 @@
     l := self listAt:cursorLine.
     textStart := l isNil ifTrue:[1] ifFalse:[l indexOfNonSeparator].
     cursorCol > textStart ifTrue:[
-        self cursorCol:textStart
+	self cursorCol:textStart
     ] ifFalse:[
-        self cursorCol:1
+	self cursorCol:1
     ]
 
     "Created: / 8.8.2004 / 18:51:21 / janfrog"
@@ -1920,7 +1920,7 @@
 
     newTop := list size - nFullLinesShown.
     (newTop < 1) ifTrue:[
-        newTop := 1
+	newTop := 1
     ].
     self scrollToLine:newTop.
 
@@ -1952,10 +1952,10 @@
     lineNr := list size.
 
     cursorLine >= lineNr ifTrue:[
-        line := self listAt:cursorLine.
-        (line isEmptyOrNil) ifTrue:[
-            ^ self
-        ]
+	line := self listAt:cursorLine.
+	(line isEmptyOrNil) ifTrue:[
+	    ^ self
+	]
     ].
 
     wasOn := self hideCursor.
@@ -1963,7 +1963,7 @@
     lineNr := lineNr + 1.
     newTop :=  lineNr - nFullLinesShown.
     (newTop < 1) ifTrue:[
-        newTop := 1
+	newTop := 1
     ].
     self scrollToLine:newTop.
 
@@ -1994,7 +1994,7 @@
 
     newTop := list size - nFullLinesShown.
     (newTop < 1) ifTrue:[
-        newTop := 1
+	newTop := 1
     ].
     self scrollToLine:newTop.
 
@@ -2014,9 +2014,9 @@
     (cursorLine > list size) ifTrue:[^ self].
 
     self wordAtLine:cursorLine col:cursorCol do:[
-        :beginLine :beginCol :endLine :endCol :style |
-
-        self cursorLine:endLine col:endCol+1
+	:beginLine :beginCol :endLine :endCol :style |
+
+	self cursorLine:endLine col:endCol+1
     ]
 
     "Created: / 28-06-2006 / 19:16:30 / cg"
@@ -2041,28 +2041,28 @@
 
     (cursorLine > list size) ifTrue:[^ self].
 
-    self 
-        wordAtLine:cursorLine col:cursorCol 
-        do:[
-            :beginLine :beginCol :endLine :endCol :style |
-
-            line := endLine.
-            col := endCol + 1.
-            searching := true.
-            [searching and:[(self characterAtLine:line col:col) isSeparator]] whileTrue:[
-                self wordAtLine:line col:col do:[
-                    :beginLine :beginCol :endLine :endCol :style |
-
-                    (line > list size) ifTrue:[
-                        "break out"
-                        searching := false
-                    ] ifFalse:[
-                        line := endLine.
-                        col := endCol + 1.
-                    ]
-                ]
-            ].
-            self cursorLine:line col:col
+    self
+	wordAtLine:cursorLine col:cursorCol
+	do:[
+	    :beginLine :beginCol :endLine :endCol :style |
+
+	    line := endLine.
+	    col := endCol + 1.
+	    searching := true.
+	    [searching and:[(self characterAtLine:line col:col) isSeparator]] whileTrue:[
+		self wordAtLine:line col:col do:[
+		    :beginLine :beginCol :endLine :endCol :style |
+
+		    (line > list size) ifTrue:[
+			"break out"
+			searching := false
+		    ] ifFalse:[
+			line := endLine.
+			col := endCol + 1.
+		    ]
+		]
+	    ].
+	    self cursorLine:line col:col
     ]
 !
 
@@ -2074,50 +2074,50 @@
     (cursorLine > list size) ifTrue:[^ self].      "/ this is rubbish
 
     self wordAtLine:cursorLine col:cursorCol do:[
-        :beginLine :beginCol :endLine :endCol :style |
-
-        line := beginLine.
-        col := beginCol.
-        style == #wordLeft ifTrue:[
-            col := col + 1
-        ].
-
-        (cursorLine == line
-        and:[cursorCol == col]) ifTrue:[
-            searching := true.
-
-            col > 1 ifTrue:[
-                col := col - 1.
-            ].
-
-            [searching] whileTrue:[
-                (col == 1) ifTrue:[
-                    line == 1 ifTrue:[
-                        searching := false
-                    ] ifFalse:[
-                        line := line - 1.
-                        l := list at:line.
-                        col := l size + 1.
-                    ]
-                ] ifFalse:[
-                    (self characterAtLine:line col:col) isSeparator ifFalse:[
-                        self wordAtLine:line col:col do:[
-                            :beginLine :beginCol :endLine :endCol :style |
-
-                            line := beginLine.
-                            col := beginCol.
-                            style == #wordLeft ifTrue:[
-                                col := col + 1
-                            ].
-                            searching := false.
-                        ]
-                    ] ifTrue:[
-                        col := col - 1
-                    ]
-                ]
-            ]
-        ].
-        self cursorLine:line col:col
+	:beginLine :beginCol :endLine :endCol :style |
+
+	line := beginLine.
+	col := beginCol.
+	style == #wordLeft ifTrue:[
+	    col := col + 1
+	].
+
+	(cursorLine == line
+	and:[cursorCol == col]) ifTrue:[
+	    searching := true.
+
+	    col > 1 ifTrue:[
+		col := col - 1.
+	    ].
+
+	    [searching] whileTrue:[
+		(col == 1) ifTrue:[
+		    line == 1 ifTrue:[
+			searching := false
+		    ] ifFalse:[
+			line := line - 1.
+			l := list at:line.
+			col := l size + 1.
+		    ]
+		] ifFalse:[
+		    (self characterAtLine:line col:col) isSeparator ifFalse:[
+			self wordAtLine:line col:col do:[
+			    :beginLine :beginCol :endLine :endCol :style |
+
+			    line := beginLine.
+			    col := beginCol.
+			    style == #wordLeft ifTrue:[
+				col := col + 1
+			    ].
+			    searching := false.
+			]
+		    ] ifTrue:[
+			col := col - 1
+		    ]
+		]
+	    ]
+	].
+	self cursorLine:line col:col
     ]
 
     "Created: 8.3.1996 / 21:52:48 / cg"
@@ -2142,22 +2142,22 @@
     |wasOn nv nl|
 
     cursorLine isNil ifTrue:[
-        self setCursorLine:(firstLineShown + nFullLinesShown - 1).
+	self setCursorLine:(firstLineShown + nFullLinesShown - 1).
     ].
     nl := cursorLine - n.
     nl < 1 ifTrue:[nl := 1].
 
     (nl ~~ cursorLine) ifTrue: [
-        wasOn := self hideCursor.
-        cursorVisibleLine notNil ifTrue:[
-            nv := cursorVisibleLine - n.
-            nv < 1 ifTrue:[
-                self scrollUp:(nv negated + 1)
-            ].
-        ].
-        self setValidatedCursorLine:nl col:cursorCol.
+	wasOn := self hideCursor.
+	cursorVisibleLine notNil ifTrue:[
+	    nv := cursorVisibleLine - n.
+	    nv < 1 ifTrue:[
+		self scrollUp:(nv negated + 1)
+	    ].
+	].
+	self setValidatedCursorLine:nl col:cursorCol.
 "/        wasOn ifTrue:[self showCursor].
-        self makeCursorVisibleAndShowCursor:wasOn.
+	self makeCursorVisibleAndShowCursor:wasOn.
     ]
 
     "Modified: 22.5.1996 / 18:28:11 / cg"
@@ -2176,7 +2176,7 @@
 
     newCol := colNr.
     (newCol < 1) ifTrue:[
-        newCol := 1
+	newCol := 1
     ].
     self setValidatedCursorCol:newCol.
 
@@ -2200,96 +2200,96 @@
      (but not, if there is a selection - to avoid confusion)"
 
     shown ifTrue:[
-        cursorVisibleLine notNil ifTrue:[
-            self hasSelection ifFalse:[
-                self drawCursorCharacter
-            ]
-        ]
+	cursorVisibleLine notNil ifTrue:[
+	    self hasSelection ifFalse:[
+		self drawCursorCharacter
+	    ]
+	]
     ]
 !
 
 drawCursor:cursorType with:fgColor and:bgColor
     "draw a cursor; the argument cursorType specifies what type
      of cursor should be drawn.
-     Currently, supported are: #none, 
-                               #block, #frame, #ibeam, #caret, #solidCaret
-                               #bigCaret and #bigSolidCaret"
+     Currently, supported are: #none,
+			       #block, #frame, #ibeam, #caret, #solidCaret
+			       #bigCaret and #bigSolidCaret"
 
     |x y w char y2 x1 x2 oldPaint oldClip|
 
     self hasSelection ifTrue:[
-        "
-         hide cursor, if there is a selection
-        "
-        ^ super redrawVisibleLine:cursorVisibleLine col:cursorCol.
+	"
+	 hide cursor, if there is a selection
+	"
+	^ super redrawVisibleLine:cursorVisibleLine col:cursorCol.
     ].
 
     cursorType == #none ifTrue:[
-        ^ self
+	^ self
     ].
 
     cursorType == #block ifTrue:[
-        super drawVisibleLine:cursorVisibleLine col:cursorCol with:fgColor and:bgColor.
-        ^ self
+	super drawVisibleLine:cursorVisibleLine col:cursorCol with:fgColor and:bgColor.
+	^ self
     ].
     x := (self xOfCol:cursorCol inVisibleLine:cursorVisibleLine) - viewOrigin x.
     y := self yOfVisibleLine:cursorVisibleLine.
 
     oldPaint := self paint. "/ do not clobber GC
     cursorType == #frame ifTrue:[
-        super redrawVisibleLine:cursorVisibleLine col:cursorCol.
-
-        char := self characterUnderCursor asString.
-        self paint:bgColor.                       
-        self displayRectangleX:x y:y width:(gc font widthOf:char) height:fontHeight-2.
+	super redrawVisibleLine:cursorVisibleLine col:cursorCol.
+
+	char := self characterUnderCursor asString.
+	self paint:bgColor.
+	self displayRectangleX:x y:y width:(gc font widthOf:char) height:fontHeight-2.
     ] ifFalse:[
-        self paint:bgColor.
-        cursorType == #ibeam ifTrue:[
-            x1 := x - 1.
-            y2 := y + fontHeight - lineSpacing - 1.
-            self displayLineFromX:x1 y:y toX:x1 y:y2.
-            self displayLineFromX:x y:y toX:x y:y2.
-            ^ self
-        ].
-
-        cursorType == #Ibeam ifTrue:[
-            x1 := x - 1.
-            y := y + 1.
-            y2 := y + fontHeight - lineSpacing - 1.
-            self displayLineFromX:x1 y:y toX:x1 y:y2.
-            self displayLineFromX:x y:y toX:x y:y2.
-            self displayLineFromX:x1-2 y:y toX:x+2 y:y.
-            self displayLineFromX:x1-2 y:y2 toX:x+2 y:y2.
-            ^ self
-        ].
-
-        y := y + fontHeight - 3.
-        ((cursorType == #bigCaret) or:[cursorType == #bigSolidCaret]) ifTrue:[
-            w := (fontWidth * 2 // 3) max:4.
-            y2 := y + w + (w//2).
-        ] ifFalse:[
-            w := (fontWidth // 2) max:4.
-            y2 := y + w.
-        ].
-        x1 := x - w.
-        x2 := x + w.
-
-        oldClip := self clippingRectangleOrNil.
-        self clippingRectangle:(margin@margin extent:(width-margin) @ (height-margin)).
-
-        cursorType == #caret ifTrue:[
-            self lineWidth:2.
-            self displayLineFromX:x1 y:y2 toX:x y:y.
-            self displayLineFromX:x y:y toX:x2 y:y2.
-        ] ifFalse:[
-            "anything else: solidCaret"
-
-            self fillPolygon:(Array with:(x1 @ y2)
-                                    with:(x @ y)
-                                    with:(x2 @ y2))
-        ].
-
-        self clippingRectangle:oldClip
+	self paint:bgColor.
+	cursorType == #ibeam ifTrue:[
+	    x1 := x - 1.
+	    y2 := y + fontHeight - lineSpacing - 1.
+	    self displayLineFromX:x1 y:y toX:x1 y:y2.
+	    self displayLineFromX:x y:y toX:x y:y2.
+	    ^ self
+	].
+
+	cursorType == #Ibeam ifTrue:[
+	    x1 := x - 1.
+	    y := y + 1.
+	    y2 := y + fontHeight - lineSpacing - 1.
+	    self displayLineFromX:x1 y:y toX:x1 y:y2.
+	    self displayLineFromX:x y:y toX:x y:y2.
+	    self displayLineFromX:x1-2 y:y toX:x+2 y:y.
+	    self displayLineFromX:x1-2 y:y2 toX:x+2 y:y2.
+	    ^ self
+	].
+
+	y := y + fontHeight - 3.
+	((cursorType == #bigCaret) or:[cursorType == #bigSolidCaret]) ifTrue:[
+	    w := (fontWidth * 2 // 3) max:4.
+	    y2 := y + w + (w//2).
+	] ifFalse:[
+	    w := (fontWidth // 2) max:4.
+	    y2 := y + w.
+	].
+	x1 := x - w.
+	x2 := x + w.
+
+	oldClip := self clippingRectangleOrNil.
+	self clippingRectangle:(margin@margin extent:(width-margin) @ (height-margin)).
+
+	cursorType == #caret ifTrue:[
+	    self lineWidth:2.
+	    self displayLineFromX:x1 y:y2 toX:x y:y.
+	    self displayLineFromX:x y:y toX:x2 y:y2.
+	] ifFalse:[
+	    "anything else: solidCaret"
+
+	    self fillPolygon:(Array with:(x1 @ y2)
+				    with:(x @ y)
+				    with:(x2 @ y2))
+	].
+
+	self clippingRectangle:oldClip
     ].
     self paint:oldPaint.
 
@@ -2304,9 +2304,9 @@
     (hasKeyboardFocus
      and:[self enabled
      and:[self isReadOnly not]]) ifTrue:[
-        self drawFocusCursor
+	self drawFocusCursor
     ] ifFalse:[
-        self drawNoFocusCursor
+	self drawNoFocusCursor
     ]
 
     "Modified: / 23.3.1999 / 13:52:48 / cg"
@@ -2316,10 +2316,10 @@
     "draw the cursor when the focus is in the view."
 
     self hasSelection ifTrue:[
-        ^ super redrawVisibleLine:cursorVisibleLine col:(cursorCol max:1).
+	^ super redrawVisibleLine:cursorVisibleLine col:(cursorCol max:1).
     ].
     cursorType == #none ifTrue:[
-        ^ self undrawCursor
+	^ self undrawCursor
     ].
     self drawCursor:cursorType with:cursorFgColor and:cursorBgColor.
 
@@ -2332,16 +2332,16 @@
     |cType|
 
     self hasSelection ifTrue:[
-        ^ super redrawVisibleLine:cursorVisibleLine col:cursorCol.
+	^ super redrawVisibleLine:cursorVisibleLine col:cursorCol.
     ].
 
     cType := cursorTypeNoFocus ? cursorType.
     cType == #none ifTrue:[
-        ^ self undrawCursor
+	^ self undrawCursor
     ].
 
     cType == #block ifTrue:[
-        ^ self drawCursor:#frame with:cursorNoFocusFgColor and:cursorBgColor
+	^ self drawCursor:#frame with:cursorNoFocusFgColor and:cursorBgColor
     ].
 
     ^ self drawCursor:cType with:cursorNoFocusFgColor and:cursorNoFocusFgColor.
@@ -2373,24 +2373,24 @@
     |line col|
 
     cursorLine notNil ifTrue:[
-        line := cursorLine.
-        col := cursorCol.
-        "
-         if there is a selection, its better to
-         have its start being visible, instead of the end
-        "
-        (selectionStartLine notNil
-        and:[selectionEndLine notNil]) ifTrue:[
-            expandingTop ~~ false ifTrue:[
-                line := selectionStartLine.
-                col := selectionStartCol.
-            ] ifFalse:[
-                line := selectionEndLine.
-                col := selectionEndCol
-            ]
-        ].
-        self makeLineVisible:line.
-        self makeColVisible:col inLine:line
+	line := cursorLine.
+	col := cursorCol.
+	"
+	 if there is a selection, its better to
+	 have its start being visible, instead of the end
+	"
+	(selectionStartLine notNil
+	and:[selectionEndLine notNil]) ifTrue:[
+	    expandingTop ~~ false ifTrue:[
+		line := selectionStartLine.
+		col := selectionStartCol.
+	    ] ifFalse:[
+		line := selectionEndLine.
+		col := selectionEndCol
+	    ]
+	].
+	self makeLineVisible:line.
+	self makeColVisible:col inLine:line
     ]
 
     "Modified: 6.3.1996 / 13:46:46 / cg"
@@ -2465,15 +2465,15 @@
     line2 := self selectionEndLine.
     col2 := self selectionEndCol.
     (line1 notNil
-        and:[ col1 notNil
-        and:[ line2 notNil
-        and:[ col2 notNil ]]])
+	and:[ col1 notNil
+	and:[ line2 notNil
+	and:[ col2 notNil ]]])
     ifTrue:[
-        self insertString:Character quote asString atLine:line2 col:col2+1.
-        self insertString:Character quote asString atLine:line1 col:col1.
-        self selectFromLine:line1 col:col1 toLine:line2 col:col2+2.
+	self insertString:Character quote asString atLine:line2 col:col2+1.
+	self insertString:Character quote asString atLine:line1 col:col1.
+	self selectFromLine:line1 col:col1 toLine:line2 col:col2+2.
     ] ifFalse:[
-        self beep.
+	self beep.
     ]
 
     "Created: / 06-06-2016 / 11:03:36 / cg"
@@ -2485,78 +2485,78 @@
     |prevCol line oldClip x y e1 e2 e3|
 
     cursorVisibleLine notNil ifTrue:[
-        prevCol := cursorCol - 1.
-
-        "/ if there is any italic stuff in the cursor line,
-        "/ redraw it completely (because characters overlap).
-        cursorCol > 1 ifTrue:[
-            (line := self listAt:cursorLine) notNil ifTrue:[
-                line hasChangeOfEmphasis ifTrue:[
-                    line size >= (cursorCol-1) ifTrue:[
-                        e1 := Text extractEmphasis:#italic from:(line emphasisAt:cursorCol-1).
-                        line size >= (cursorCol) ifTrue:[
-                            e2 := Text extractEmphasis:#italic from:(line emphasisAt:cursorCol).
-                            line size >= (cursorCol+1) ifTrue:[
-                                e3 := Text extractEmphasis:#italic from:(line emphasisAt:cursorCol+1)
-                            ].
-                        ].
-                    ].
-                    (e1 notNil or:[e2 notNil or:[e3 notNil]]) ifTrue:[
-                        ^ super redrawVisibleLine:cursorVisibleLine
-                    ]
-                ]
-            ]
-        ].
-
-        ((cursorType == #caret)
-         or:[cursorType == #solidCaret
-         or:[cursorType == #bigSolidCaret
-         or:[cursorType == #bigCaret
-         or:[cursorType == #Ibeam]]]]) ifTrue:[
-            "caret-cursor touches 4 characters"
-            ((cursorCol > 1) and:[fontIsFixedWidth]) ifTrue:[
-                super redrawVisibleLine:cursorVisibleLine-1 from:prevCol to:cursorCol.
-                super redrawVisibleLine:cursorVisibleLine from:prevCol to:cursorCol.
-                super redrawVisibleLine:cursorVisibleLine+1 from:prevCol to:cursorCol.
-            ] ifFalse:[
-                "care for left margin"
-                super redrawVisibleLine:cursorVisibleLine; redrawVisibleLine:cursorVisibleLine+1.
-            ].
-            ^ self
-        ].
-
-        cursorType == #ibeam ifTrue:[
-            "ibeam-cursor touches 2 characters"
-            cursorCol > 1 ifTrue:[
-                super redrawVisibleLine:cursorVisibleLine from:prevCol to:cursorCol.
-            ] ifFalse:[
-                "care for left margin"
-                super redrawVisibleLine:cursorVisibleLine.
-            ].
-            ^ self
-        ].
-
-        "block cursor is simple - just one character under cursor"
-
-        "/ however, if italic characters are involved, we must care
-        "/ for the chars before/after the cursor.
-        "/ We redraw the part of the previous character which got
-        "/ detroyed by the block cursor.
-        "/ (must change the clip, to avoid destroying the prev-prev character)
-
-        line := self visibleAt:cursorVisibleLine.
-        (line notNil and:[line isText]) ifTrue:[
-            cursorCol > 1 ifTrue:[
-                oldClip := self clippingRectangleOrNil.
-                x := (self xOfCol:cursorCol inVisibleLine:cursorVisibleLine) - viewOrigin x.
-                y := self yOfVisibleLine:cursorVisibleLine.
-                self clippingRectangle:(x@y extent:((gc font width * 2) @ fontHeight)).
-                super redrawVisibleLine:cursorVisibleLine from:cursorCol-1 to:cursorCol.
-                self clippingRectangle:oldClip.
-                ^ self.
-            ].
-        ].
-        super redrawVisibleLine:cursorVisibleLine col:cursorCol
+	prevCol := cursorCol - 1.
+
+	"/ if there is any italic stuff in the cursor line,
+	"/ redraw it completely (because characters overlap).
+	cursorCol > 1 ifTrue:[
+	    (line := self listAt:cursorLine) notNil ifTrue:[
+		line hasChangeOfEmphasis ifTrue:[
+		    line size >= (cursorCol-1) ifTrue:[
+			e1 := Text extractEmphasis:#italic from:(line emphasisAt:cursorCol-1).
+			line size >= (cursorCol) ifTrue:[
+			    e2 := Text extractEmphasis:#italic from:(line emphasisAt:cursorCol).
+			    line size >= (cursorCol+1) ifTrue:[
+				e3 := Text extractEmphasis:#italic from:(line emphasisAt:cursorCol+1)
+			    ].
+			].
+		    ].
+		    (e1 notNil or:[e2 notNil or:[e3 notNil]]) ifTrue:[
+			^ super redrawVisibleLine:cursorVisibleLine
+		    ]
+		]
+	    ]
+	].
+
+	((cursorType == #caret)
+	 or:[cursorType == #solidCaret
+	 or:[cursorType == #bigSolidCaret
+	 or:[cursorType == #bigCaret
+	 or:[cursorType == #Ibeam]]]]) ifTrue:[
+	    "caret-cursor touches 4 characters"
+	    ((cursorCol > 1) and:[fontIsFixedWidth]) ifTrue:[
+		super redrawVisibleLine:cursorVisibleLine-1 from:prevCol to:cursorCol.
+		super redrawVisibleLine:cursorVisibleLine from:prevCol to:cursorCol.
+		super redrawVisibleLine:cursorVisibleLine+1 from:prevCol to:cursorCol.
+	    ] ifFalse:[
+		"care for left margin"
+		super redrawVisibleLine:cursorVisibleLine; redrawVisibleLine:cursorVisibleLine+1.
+	    ].
+	    ^ self
+	].
+
+	cursorType == #ibeam ifTrue:[
+	    "ibeam-cursor touches 2 characters"
+	    cursorCol > 1 ifTrue:[
+		super redrawVisibleLine:cursorVisibleLine from:prevCol to:cursorCol.
+	    ] ifFalse:[
+		"care for left margin"
+		super redrawVisibleLine:cursorVisibleLine.
+	    ].
+	    ^ self
+	].
+
+	"block cursor is simple - just one character under cursor"
+
+	"/ however, if italic characters are involved, we must care
+	"/ for the chars before/after the cursor.
+	"/ We redraw the part of the previous character which got
+	"/ detroyed by the block cursor.
+	"/ (must change the clip, to avoid destroying the prev-prev character)
+
+	line := self visibleAt:cursorVisibleLine.
+	(line notNil and:[line isText]) ifTrue:[
+	    cursorCol > 1 ifTrue:[
+		oldClip := self clippingRectangleOrNil.
+		x := (self xOfCol:cursorCol inVisibleLine:cursorVisibleLine) - viewOrigin x.
+		y := self yOfVisibleLine:cursorVisibleLine.
+		self clippingRectangle:(x@y extent:((gc font width * 2) @ fontHeight)).
+		super redrawVisibleLine:cursorVisibleLine from:cursorCol-1 to:cursorCol.
+		self clippingRectangle:oldClip.
+		^ self.
+	    ].
+	].
+	super redrawVisibleLine:cursorVisibleLine col:cursorCol
     ]
 
     "Modified: / 15.12.1999 / 22:25:59 / cg"
@@ -2582,11 +2582,11 @@
     "/ end of a line or beyond the last line of the text
 
     self st80EditMode ifTrue:[
-        l := (self listAt:line).
-        max := l size + 1.
-        col > max ifTrue:[
-            ^ max
-        ]
+	l := (self listAt:line).
+	max := l size + 1.
+	col > max ifTrue:[
+	    ^ max
+	]
     ].
     ^ col
 
@@ -2603,12 +2603,12 @@
 
     "/
     "/ in st80Mode, the cursor may not be positioned
-    "/ beyond the last line 
-    "/ (but it must be posible to place it on one line below the last one 
+    "/ beyond the last line
+    "/ (but it must be posible to place it on one line below the last one
     "/ - otherwise deleteSelection and some others fail to delete from previousToLastLine)
     "/
     self st80EditMode ifTrue:[
-        ^ (line min:(list size + 1)) max:1
+	^ (line min:(list size + 1)) max:1
     ].
     ^ line
 
@@ -2620,11 +2620,11 @@
     "evaluate aBlock with cursor off; turn it on afterwards."
 
     (shown not or:[cursorShown not]) ifTrue:[
-        ^ aBlock value
+	^ aBlock value
     ].
     self hideCursor.
     aBlock ensure:[
-        self showCursor
+	self showCursor
     ]
 ! !
 
@@ -2634,15 +2634,15 @@
     "enable/disable drop support"
 
     aBoolean ifFalse:[
-        dropTarget := nil.
+	dropTarget := nil.
     ] ifTrue:[
-        dropTarget isNil ifTrue:[
-            dropTarget := DropTarget 
-                                receiver:self
-                                argument:nil
-                                dropSelector:#'drop:'
-                                canDropSelector:#'canDrop:'
-        ]
+	dropTarget isNil ifTrue:[
+	    dropTarget := DropTarget
+				receiver:self
+				argument:nil
+				dropSelector:#'drop:'
+				canDropSelector:#'canDrop:'
+	]
     ].
 !
 
@@ -2689,53 +2689,53 @@
 
     fn := aDropObject asFilename.
     (fn exists and:[fn isRegularFile]) ifTrue:[
-        enforcedDropMode := UserPreferences current enforcedDropModeForFiles.
-        (enforcedDropMode notNil 
-        and:[enforcedDropMode ~~ #name or:[fn fileSize <= (1024*1024)]]) ifTrue:[
-            pasteWhat := enforcedDropMode.
-        ] ifFalse:[
-            sensor := self sensor.
-            (sensor shiftDown or:[sensor ctrlDown]) ifTrue:[
-                pasteWhat := #name.
-            ] ifFalse:[
-                (sensor metaDown) ifTrue:[
-                    pasteWhat := #contents.
-                ] ifFalse:[
-                    dontAskAgainHolder := false asValue.
-                    answer := Dialog
-                        confirmWithCancel:(resources
-                                            stringWithCRs:'Drop the Filename (%1)\or its Contents ?\\Hint: bypass this dialog by pressing SHIFT/CTRL or ALT during the next drop.\SHIFT/CTRL to drop the name, ALT for the contents.'
-                                            with:fn name allBold)
-                        labels:#( 'Cancel' 'Name' 'Contents' )
-                        values:#( nil #name #contents )
-                        default:#contents
-                        check:(resources string:'Do not ask again; instead, always paste the contents of small files.') on:dontAskAgainHolder
-                        title:(resources string:'Drop What').
-                    answer isNil ifTrue:[ ^ self ].
-
-                    dontAskAgainHolder value ifTrue:[
-                        UserPreferences current enforcedDropModeForFiles:#contents
-                    ].
-                    pasteWhat := answer.
-                ]
-            ]
-        ].
+	enforcedDropMode := UserPreferences current enforcedDropModeForFiles.
+	(enforcedDropMode notNil
+	and:[enforcedDropMode ~~ #name or:[fn fileSize <= (1024*1024)]]) ifTrue:[
+	    pasteWhat := enforcedDropMode.
+	] ifFalse:[
+	    sensor := self sensor.
+	    (sensor shiftDown or:[sensor ctrlDown]) ifTrue:[
+		pasteWhat := #name.
+	    ] ifFalse:[
+		(sensor metaDown) ifTrue:[
+		    pasteWhat := #contents.
+		] ifFalse:[
+		    dontAskAgainHolder := false asValue.
+		    answer := Dialog
+			confirmWithCancel:(resources
+					    stringWithCRs:'Drop the Filename (%1)\or its Contents ?\\Hint: bypass this dialog by pressing SHIFT/CTRL or ALT during the next drop.\SHIFT/CTRL to drop the name, ALT for the contents.'
+					    with:fn name allBold)
+			labels:#( 'Cancel' 'Name' 'Contents' )
+			values:#( nil #name #contents )
+			default:#contents
+			check:(resources string:'Do not ask again; instead, always paste the contents of small files.') on:dontAskAgainHolder
+			title:(resources string:'Drop What').
+		    answer isNil ifTrue:[ ^ self ].
+
+		    dontAskAgainHolder value ifTrue:[
+			UserPreferences current enforcedDropModeForFiles:#contents
+		    ].
+		    pasteWhat := answer.
+		]
+	    ]
+	].
     ].
 
     pasteWhat == #name ifTrue:[
-        text := fn pathName
+	text := fn pathName
     ] ifFalse:[
-        self withWaitCursorDo:[
-            text := fn contentsAsString
-        ].
-        (app := self application) notNil ifTrue:[
-            app droppedFile:fn in:self
-        ].
-    ].
-
-    self 
-        undoablePaste:text 
-        info:'Drop File'.
+	self withWaitCursorDo:[
+	    text := fn contentsAsString
+	].
+	(app := self application) notNil ifTrue:[
+	    app droppedFile:fn in:self
+	].
+    ].
+
+    self
+	undoablePaste:text
+	info:'Drop File'.
 
     "Created: / 13-10-2006 / 17:38:31 / cg"
     "Modified: / 28-07-2007 / 13:27:09 / cg"
@@ -2748,19 +2748,19 @@
     |text|
 
     (aDropObject isFileObject) ifTrue:[
-        self dropFileObject:aDropObject
+	self dropFileObject:aDropObject
     ] ifFalse:[
-        aDropObject isTextObject ifTrue:[
-            text := aDropObject theObject.
-            text isStringCollection ifTrue:[
-                text := text asStringWithoutFinalCR
-            ].
-        ] ifFalse:[
-            text := aDropObject theObject asString
-        ].
-        self 
-            undoablePaste:text 
-            info:'Drop'.
+	aDropObject isTextObject ifTrue:[
+	    text := aDropObject theObject.
+	    text isStringCollection ifTrue:[
+		text := text asStringWithoutFinalCR
+	    ].
+	] ifFalse:[
+	    text := aDropObject theObject asString
+	].
+	self
+	    undoablePaste:text
+	    info:'Drop'.
     ].
 
     "Created: / 13-10-2006 / 17:37:05 / cg"
@@ -2772,7 +2772,7 @@
      drop objects (old API)"
 
     aCollectionOfDropObjects do:[:el |
-        self dropObject:el
+	self dropObject:el
     ].
 
     "Created: / 13-10-2006 / 15:59:40 / cg"
@@ -2789,32 +2789,32 @@
     line1 := self selectionStartLine.
     line2 := self selectionEndLine.
     line1 isNil ifTrue:[
-        line1 := self perform:#cursorLine ifNotUnderstood:nil.
-        line1 notNil ifTrue:[
-            line2 := line1
-        ]
+	line1 := self perform:#cursorLine ifNotUnderstood:nil.
+	line1 notNil ifTrue:[
+	    line2 := line1
+	]
     ].
     line1 notNil ifTrue:[
-        line1 to:line2 do:[:lineNr |
-            |line col1 col2 newLine|
-
-            line := (self listAt:lineNr) copy.
-            line size > 0 ifTrue:[
-                lineNr == line1 ifTrue:[
-                    col1 := selectionStartCol.
-                ] ifFalse:[
-                    col1 := 1.
-                ].
-                lineNr == line2 ifTrue:[
-                    col2 := selectionEndCol.
-                ] ifFalse:[
-                    col2 := (self listAt:lineNr) size.
-                ].
-                newLine := converter value:line value:lineNr value:col1 value:col2.
-                self withoutRedrawAt:lineNr put:newLine.
-                self invalidateLine:lineNr.
-            ].
-        ].
+	line1 to:line2 do:[:lineNr |
+	    |line col1 col2 newLine|
+
+	    line := (self listAt:lineNr) copy.
+	    line size > 0 ifTrue:[
+		lineNr == line1 ifTrue:[
+		    col1 := selectionStartCol.
+		] ifFalse:[
+		    col1 := 1.
+		].
+		lineNr == line2 ifTrue:[
+		    col2 := selectionEndCol.
+		] ifFalse:[
+		    col2 := (self listAt:lineNr) size.
+		].
+		newLine := converter value:line value:lineNr value:col1 value:col2.
+		self withoutRedrawAt:lineNr put:newLine.
+		self invalidateLine:lineNr.
+	    ].
+	].
     ]
 
     "Created: / 06-06-2016 / 10:53:17 / cg"
@@ -2824,13 +2824,13 @@
     "to-lower selected text"
 
     self applyConverterToSelection:[:line :lnr :col1 :col2 |
-        col1 to:col2 do:[:col |
-            |ch|
-
-            ch := line at:col.
-            line at:col put:ch asLowercase.
-        ].
-        line.        
+	col1 to:col2 do:[:col |
+	    |ch|
+
+	    ch := line at:col.
+	    line at:col put:ch asLowercase.
+	].
+	line.
     ].
 
     "Created: / 06-06-2016 / 10:50:28 / cg"
@@ -2840,72 +2840,72 @@
     "toLower/toUppercaseFirst/toUpper selected text"
 
     self applyConverterToSelection:[:line :lineNr :col1 :col2 |
-        |isAllLower isLowerFirst isAllUpper isUpperFirst
-         makeLowercase makeUppercase makeUppercaseFirst makeLowercaseFirst|
-
-        isAllLower := isAllUpper := isUpperFirst := isLowerFirst := true.
-        col1 to:col2 do:[:col |
-            |ch|
-
-            ch := line at:col.
-            ch isUppercase ifTrue:[
-                isAllLower := false.
-                col == col1 ifTrue:[
-                    isLowerFirst := false.
-                ].
-            ] ifFalse:[
-                ch isLowercase ifTrue:[
-                    isAllUpper := false.
-                    col == col1 ifTrue:[
-                        isUpperFirst := false.
-                    ].
-                ]
-            ].
-        ].
-
-        makeLowercase := makeUppercase := makeUppercaseFirst := makeLowercaseFirst := false.
-        isLowerFirst ifTrue:[
-            makeUppercaseFirst := true.
-        ] ifFalse:[
-            "/ must remember where we come from - otherwise, we end up
-            "/ in upperFirst - lowerFirst cycle.
-            "/ think about a good place to store this state
-            false "(isUpperFirst and:[isAllUpper not])" ifTrue:[
-                makeLowercaseFirst := true.
-             ] ifFalse:[
-                isAllUpper ifTrue:[
-                    makeLowercase := true.
-                ] ifFalse:[
-                    makeUppercase := true.
-                ]
-            ]
-        ].
-        makeUppercaseFirst ifTrue:[
-            line at:col1 put:(line at:col1) asUppercase.
-        ] ifFalse:[
-            makeLowercaseFirst ifTrue:[
-                line at:col1 put:(line at:col1) asLowercase.
-            ] ifFalse:[
-                col1 to:col2 do:[:col |
-                    |ch|
-
-                    ch := line at:col.
-                    ch := makeLowercase
-                            ifTrue:[ ch asLowercase ]
-                            ifFalse:[
-                                makeUppercase
-                                    ifTrue:[ ch asUppercase ]
-                                    ifFalse:[
-                                        col == col1
-                                            ifTrue:[ ch asUppercase ]
-                                            ifFalse:[ ch asLowercase ]
-                                    ]
-                            ].
-                    line at:col put:ch.
-                ].
-            ].
-        ].
-        line
+	|isAllLower isLowerFirst isAllUpper isUpperFirst
+	 makeLowercase makeUppercase makeUppercaseFirst makeLowercaseFirst|
+
+	isAllLower := isAllUpper := isUpperFirst := isLowerFirst := true.
+	col1 to:col2 do:[:col |
+	    |ch|
+
+	    ch := line at:col.
+	    ch isUppercase ifTrue:[
+		isAllLower := false.
+		col == col1 ifTrue:[
+		    isLowerFirst := false.
+		].
+	    ] ifFalse:[
+		ch isLowercase ifTrue:[
+		    isAllUpper := false.
+		    col == col1 ifTrue:[
+			isUpperFirst := false.
+		    ].
+		]
+	    ].
+	].
+
+	makeLowercase := makeUppercase := makeUppercaseFirst := makeLowercaseFirst := false.
+	isLowerFirst ifTrue:[
+	    makeUppercaseFirst := true.
+	] ifFalse:[
+	    "/ must remember where we come from - otherwise, we end up
+	    "/ in upperFirst - lowerFirst cycle.
+	    "/ think about a good place to store this state
+	    false "(isUpperFirst and:[isAllUpper not])" ifTrue:[
+		makeLowercaseFirst := true.
+	     ] ifFalse:[
+		isAllUpper ifTrue:[
+		    makeLowercase := true.
+		] ifFalse:[
+		    makeUppercase := true.
+		]
+	    ]
+	].
+	makeUppercaseFirst ifTrue:[
+	    line at:col1 put:(line at:col1) asUppercase.
+	] ifFalse:[
+	    makeLowercaseFirst ifTrue:[
+		line at:col1 put:(line at:col1) asLowercase.
+	    ] ifFalse:[
+		col1 to:col2 do:[:col |
+		    |ch|
+
+		    ch := line at:col.
+		    ch := makeLowercase
+			    ifTrue:[ ch asLowercase ]
+			    ifFalse:[
+				makeUppercase
+				    ifTrue:[ ch asUppercase ]
+				    ifFalse:[
+					col == col1
+					    ifTrue:[ ch asUppercase ]
+					    ifFalse:[ ch asLowercase ]
+				    ]
+			    ].
+		    line at:col put:ch.
+		].
+	    ].
+	].
+	line
     ]
 
     "Created: / 14-07-2011 / 11:40:26 / cg"
@@ -2916,13 +2916,13 @@
     "to-upper selected text"
 
     self applyConverterToSelection:[:line :lnr :col1 :col2 |
-        col1 to:col2 do:[:col |
-            |ch|
-
-            ch := line at:col.
-            line at:col put:ch asUppercase.
-        ].
-        line.        
+	col1 to:col2 do:[:col |
+	    |ch|
+
+	    ch := line at:col.
+	    line at:col put:ch asUppercase.
+	].
+	line.
     ].
 
     "Created: / 06-06-2016 / 11:09:04 / cg"
@@ -2932,23 +2932,23 @@
     "to-upperFirst selected text"
 
     self applyConverterToSelection:[:line :lnr :col1 :col2 |
-        |state|
-
-        state := #first.
-        col1 to:col2 do:[:col |
-            |ch|
-
-            ch := line at:col.
-            ch isSeparator ifFalse:[
-                state == #first ifTrue:[
-                    line at:col put:ch asUppercase.
-                    state := #skipRest
-                ]
-            ] ifTrue:[
-                state := #first
-            ]
-        ].
-        line.        
+	|state|
+
+	state := #first.
+	col1 to:col2 do:[:col |
+	    |ch|
+
+	    ch := line at:col.
+	    ch isSeparator ifFalse:[
+		state == #first ifTrue:[
+		    line at:col put:ch asUppercase.
+		    state := #skipRest
+		]
+	    ] ifTrue:[
+		state := #first
+	    ]
+	].
+	line.
     ].
 
     "Created: / 06-06-2016 / 10:50:52 / cg"
@@ -2958,8 +2958,8 @@
     "copy the selection into the pastBuffer and delete it"
 
     selectionStartLine notNil ifTrue:[
-        self setClipboardText:(self selection).
-        self deleteSelection.
+	self setClipboardText:(self selection).
+	self deleteSelection.
     ].
 
     "Created: 27.1.1996 / 16:23:28 / cg"
@@ -2979,16 +2979,16 @@
     "delete a single character at colNr in line lineNr"
 
     self st80EditMode ifTrue:[
-        (self listAt:cursorLine) size + 1 = colNr ifTrue:[
-            | wasOn |
-            wasOn := self hideCursor.
-            self
-                cursorReturn;
-                cursorCol:1;
-                deleteCharBeforeCursor.
-            wasOn ifTrue:[ self showCursor].
-            ^ self.
-        ].
+	(self listAt:cursorLine) size + 1 = colNr ifTrue:[
+	    | wasOn |
+	    wasOn := self hideCursor.
+	    self
+		cursorReturn;
+		cursorCol:1;
+		deleteCharBeforeCursor.
+	    wasOn ifTrue:[ self showCursor].
+	    ^ self.
+	].
     ].
 
     self deleteCharsAtLine:lineNr fromCol:colNr toCol:colNr
@@ -3001,34 +3001,34 @@
 
     wasOn := self hideCursor.
     (autoIndent and:[ (tabPositions includes:cursorCol)]) ifTrue:[
-        prevTab := (self prevTabBefore:cursorCol) max:1.
-        ln := originalLine := (list at:cursorLine ifAbsent:'') ? ''.
-        ln size < prevTab ifTrue:[
-            ln := ln , (String new:prevTab withAll:Character space).
-        ].
-        (ln copyTo:prevTab) isBlank ifTrue:[
-            (ln copyFrom:prevTab+1) isBlank ifTrue:[
-                cursorCol > prevTab ifTrue:[
-                    self st80EditMode ifTrue:[
-                        "/ ensure that there is no conflict here: st80EditMode will
-                        "/ not allow a cursor position beyond the end of line,
-                        "/ so ensure that cursorLine:col: will force us to the beginning of the line
-                        originalLine size < prevTab ifTrue:[
-                            self checkForExistingLine:cursorLine.    
-                            self basicListAt:cursorLine put:ln
-                        ]
-                    ].
-                    self cursorLine:cursorLine col:prevTab.
-                    wasOn ifTrue:[ self showCursor ].
-                    ^  self
-                ].
-            ] ifFalse:[
-                self deleteFromLine:cursorLine col:prevTab toLine:cursorLine col:cursorCol-1.
-                self cursorLine:cursorLine col:prevTab.
-                wasOn ifTrue:[ self showCursor ].
-                ^  self.
-            ]
-        ].
+	prevTab := (self prevTabBefore:cursorCol) max:1.
+	ln := originalLine := (list at:cursorLine ifAbsent:'') ? ''.
+	ln size < prevTab ifTrue:[
+	    ln := ln , (String new:prevTab withAll:Character space).
+	].
+	(ln copyTo:prevTab) isBlank ifTrue:[
+	    (ln copyFrom:prevTab+1) isBlank ifTrue:[
+		cursorCol > prevTab ifTrue:[
+		    self st80EditMode ifTrue:[
+			"/ ensure that there is no conflict here: st80EditMode will
+			"/ not allow a cursor position beyond the end of line,
+			"/ so ensure that cursorLine:col: will force us to the beginning of the line
+			originalLine size < prevTab ifTrue:[
+			    self checkForExistingLine:cursorLine.
+			    self basicListAt:cursorLine put:ln
+			]
+		    ].
+		    self cursorLine:cursorLine col:prevTab.
+		    wasOn ifTrue:[ self showCursor ].
+		    ^  self
+		].
+	    ] ifFalse:[
+		self deleteFromLine:cursorLine col:prevTab toLine:cursorLine col:cursorCol-1.
+		self cursorLine:cursorLine col:prevTab.
+		wasOn ifTrue:[ self showCursor ].
+		^  self.
+	    ]
+	].
     ].
 
 "/        (autoIndent
@@ -3044,32 +3044,32 @@
 "/            ]
 "/        ]
 "/    ] ifFalse:[
-        soCol := 1.
+	soCol := 1.
 "/    ].
 
     (cursorCol ~~ soCol and:[cursorCol ~~ 1]) ifTrue:[
-        "
-         somewhere in the middle of a line
-        "
-        self cursorLeft.
-        self deleteCharAtLine:cursorLine col:cursorCol.
+	"
+	 somewhere in the middle of a line
+	"
+	self cursorLeft.
+	self deleteCharAtLine:cursorLine col:cursorCol.
     ] ifFalse:[
-        "
-         at begin of line - merge with previous line;
-         except for the very first line.
-        "
-        (cursorLine == 1) ifFalse:[
-            lineNrAboveCursor := self validateCursorLine:(cursorLine - 1).
-            lineNrAboveCursor < cursorLine ifTrue:[
-                (lineNrAboveCursor > 0 and:[lineNrAboveCursor > list size]) ifTrue:[
-                    "/ we are beyond the end of the text.
-                    "/ move the cursor to the previous line.
-                    self cursorLine:lineNrAboveCursor col:1.
-                ] ifFalse:[
-                    self mergeLine:lineNrAboveCursor removeBlanks:false.
-                ]
-            ]
-        ]
+	"
+	 at begin of line - merge with previous line;
+	 except for the very first line.
+	"
+	(cursorLine == 1) ifFalse:[
+	    lineNrAboveCursor := self validateCursorLine:(cursorLine - 1).
+	    lineNrAboveCursor < cursorLine ifTrue:[
+		(lineNrAboveCursor > 0 and:[lineNrAboveCursor > list size]) ifTrue:[
+		    "/ we are beyond the end of the text.
+		    "/ move the cursor to the previous line.
+		    self cursorLine:lineNrAboveCursor col:1.
+		] ifFalse:[
+		    self mergeLine:lineNrAboveCursor removeBlanks:false.
+		]
+	    ]
+	]
     ].
     wasOn ifTrue:[ self showCursor ]
 
@@ -3082,7 +3082,7 @@
     |line|
 
     (line := self listAt:lineNr) notNil ifTrue:[
-        self deleteCharsAtLine:lineNr fromCol:colNr toCol:(line size)
+	self deleteCharsAtLine:lineNr fromCol:colNr toCol:(line size)
     ]
 
 !
@@ -3119,8 +3119,8 @@
     line1 := self lineOfCharacterPosition:charPos1.
     col1 := charPos1 - (self characterPositionOfLine:line1 col:1) + 1.
     col1 == 0 ifTrue:[
-        line1 := line1 - 1.
-        col1 := (self listAt:line1) size + 1.
+	line1 := line1 - 1.
+	col1 := (self listAt:line1) size + 1.
     ].
 
     line2 := self lineOfCharacterPosition:charPos2.
@@ -3140,17 +3140,17 @@
     startLine > list size ifTrue:[ ^ self]. "/ deleted space below text
 
     (startLine == endLine) ifTrue:[
-        "/ delete chars within a line
-        self deleteCharsAtLine:startLine fromCol:startCol toCol:endCol.
-        ^ self
+	"/ delete chars within a line
+	self deleteCharsAtLine:startLine fromCol:startCol toCol:endCol.
+	^ self
     ].
 
     ((startCol == 1) and:[endCol == 0]) ifTrue:[
-        "/ delete full lines only
-        endLine > startLine ifTrue:[
-            self deleteFromLine:startLine toLine:(endLine - 1)
-        ].
-        ^ self
+	"/ delete full lines only
+	endLine > startLine ifTrue:[
+	    self deleteFromLine:startLine toLine:(endLine - 1)
+	].
+	^ self
     ].
 
     "/ delete right rest of 1st line
@@ -3158,39 +3158,39 @@
 
     "/ delete the inner lines ...
     endLine > (startLine + 1) ifTrue:[
-        self deleteFromLine:(startLine + 1) toLine:(endLine - 1)
+	self deleteFromLine:(startLine + 1) toLine:(endLine - 1)
     ].
 
     (endCol ~~ 0) ifTrue:[
-        "/ delete the left rest of the last line
-
-        self deleteCharsAtLine:(startLine + 1) toCol:endCol.
-
-        "/ must add blanks, if startCol lies beyond end of startLine
-        startLine <= list size ifTrue:[
-            line := list at:startLine.
-            lineSize := line size.
-            (startCol > lineSize) ifTrue:[
-                newLine := line.
-                line isNil ifTrue:[
-                    newLine := String new:(startCol - 1)
-                ] ifFalse:[
-                    nMore := startCol - 1 - lineSize.
-                    nMore > 0 ifTrue:[
-                        newLine := line , (line species new:nMore)
-                    ]
-                ].
-                newLine ~~ line ifTrue:[
-                    self basicListAt:startLine put:newLine.
-                ].
-                "/ TODO: remember old maxwidth of linerange,
-                "/ only clear widthOfWidestLine, if this max
-                "/ length was (one of) the longest.
-                "/ avoids slow delete with huge texts.
-                widthOfWidestLine := nil. "/ i.e. unknown
-                self textChanged.
-            ]
-        ]
+	"/ delete the left rest of the last line
+
+	self deleteCharsAtLine:(startLine + 1) toCol:endCol.
+
+	"/ must add blanks, if startCol lies beyond end of startLine
+	startLine <= list size ifTrue:[
+	    line := list at:startLine.
+	    lineSize := line size.
+	    (startCol > lineSize) ifTrue:[
+		newLine := line.
+		line isNil ifTrue:[
+		    newLine := String new:(startCol - 1)
+		] ifFalse:[
+		    nMore := startCol - 1 - lineSize.
+		    nMore > 0 ifTrue:[
+			newLine := line , (line species new:nMore)
+		    ]
+		].
+		newLine ~~ line ifTrue:[
+		    self basicListAt:startLine put:newLine.
+		].
+		"/ TODO: remember old maxwidth of linerange,
+		"/ only clear widthOfWidestLine, if this max
+		"/ length was (one of) the longest.
+		"/ avoids slow delete with huge texts.
+		widthOfWidestLine := nil. "/ i.e. unknown
+		self textChanged.
+	    ]
+	]
     ].
 
     "/ merge the left rest of 1st line with right rest of last line into one
@@ -3240,9 +3240,9 @@
 
     (list isNil or:[startLine > list size]) ifTrue:[^ false].
     (endLine > list size) ifTrue:[
-        lastLine := list size
+	lastLine := list size
     ] ifFalse:[
-        lastLine := endLine
+	lastLine := endLine
     ].
     self basicListRemoveFromIndex:startLine toIndex:lastLine.
     "/ TODO: remember old maxwidth of linerange,
@@ -3264,17 +3264,17 @@
     self checkModificationsAllowed ifFalse:[ ^ self].
 
     selectionStartLine notNil ifTrue:[
-        wasOn := self hideCursor.
-
-        startLine := selectionStartLine.
-        startCol := selectionStartCol.
-        endLine := selectionEndLine.
-        endCol := selectionEndCol.
-        self unselectWithoutRedraw.
-        self deleteFromLine:startLine col:startCol toLine:endLine col:endCol.
-        self setCursorLine:startLine col:startCol.
-
-        self makeCursorVisibleAndShowCursor:wasOn
+	wasOn := self hideCursor.
+
+	startLine := selectionStartLine.
+	startCol := selectionStartCol.
+	endLine := selectionEndLine.
+	endCol := selectionEndCol.
+	self unselectWithoutRedraw.
+	self deleteFromLine:startLine col:startCol toLine:endLine col:endCol.
+	self setCursorLine:startLine col:startCol.
+
+	self makeCursorVisibleAndShowCursor:wasOn
     ]
 !
 
@@ -3285,22 +3285,22 @@
 
     self checkModificationsAllowed ifFalse:[ ^ self].
     cursorCol <= 1 ifTrue:[
-        self deleteCharBeforeCursor.
-        ^ self 
+	self deleteCharBeforeCursor.
+	^ self
     ].
 
     wasOn := self hideCursor.
-    self 
-        undoableDo:[
-            endCol := cursorCol-1.
-            endLine := cursorLine.
-            self cursorToPreviousWord.
-            beginCol := cursorCol.
-            beginLine := cursorLine.
-            self deleteFromLine:beginLine col:beginCol toLine:endLine col:endCol.
-            self cursorLine:cursorLine col:beginCol.
-        ] 
-        info:'Delete Word'.
+    self
+	undoableDo:[
+	    endCol := cursorCol-1.
+	    endLine := cursorLine.
+	    self cursorToPreviousWord.
+	    beginCol := cursorCol.
+	    beginLine := cursorLine.
+	    self deleteFromLine:beginLine col:beginCol toLine:endLine col:endCol.
+	    self cursorLine:cursorLine col:beginCol.
+	]
+	info:'Delete Word'.
     wasOn ifTrue:[ self showCursor ].
 
     "Modified: / 22.2.2000 / 23:59:04 / cg"
@@ -3321,7 +3321,7 @@
 
     self basicInsert:aCharacter atLine:lineNr col:colNr.
     aCharacter ~~ Character cr ifTrue:[
-        self addUndo:(DeleteCharacters line:lineNr col:colNr info:'insert').
+	self addUndo:(DeleteCharacters line:lineNr col:colNr info:'insert').
     ]
 !
 
@@ -3332,15 +3332,15 @@
 
     wasOn := self hideCursor.
     aCharacter == Character tab ifTrue:[
-        "/ needs special care to advance cursor correctly
-        self insertTabAtCursor
+	"/ needs special care to advance cursor correctly
+	self insertTabAtCursor
     ] ifFalse:[
-        self insert:aCharacter atLine:cursorLine col:cursorCol.
-        aCharacter == (Character cr) ifTrue:[
-            self basicCursorReturn
-        ] ifFalse:[
-            self cursorRight.
-        ].
+	self insert:aCharacter atLine:cursorLine col:cursorCol.
+	aCharacter == (Character cr) ifTrue:[
+	    self basicCursorReturn
+	] ifFalse:[
+	    self cursorRight.
+	].
     ].
     self makeCursorVisibleAndShowCursor:wasOn.
 
@@ -3373,68 +3373,68 @@
 
     "wrong when pasting multiple lines"
     false "autoIndent" ifTrue:[
-        indent := self leftIndentForLine:lineNr.
-
-        text := someText 
-            collect:[:ln||line|
-                ln notNil ifTrue:[
-                    line := ln withoutLeadingSeparators.
-                    (line isEmpty or:[indent == 0]) ifFalse:[
-                        line := (String new:indent), line
-                    ].
-                    line
-                ] ifFalse:[
-                    nil
-                ]
-            ].
+	indent := self leftIndentForLine:lineNr.
+
+	text := someText
+	    collect:[:ln||line|
+		ln notNil ifTrue:[
+		    line := ln withoutLeadingSeparators.
+		    (line isEmpty or:[indent == 0]) ifFalse:[
+			line := (String new:indent), line
+		    ].
+		    line
+		] ifFalse:[
+		    nil
+		]
+	    ].
     ] ifFalse:[
-        text := someText
+	text := someText
     ].
 
     visLine := self listLineToVisibleLine:lineNr.
     (shown not or:[visLine isNil]) ifTrue:[
-        self withoutRedrawInsertLines:text
-             from:start to:end
-             before:lineNr.
+	self withoutRedrawInsertLines:text
+	     from:start to:end
+	     before:lineNr.
     ] ifFalse:[
-        nLines := end - start + 1.
-        ((visLine + nLines) >= nLinesShown) ifTrue:[
-            self withoutRedrawInsertLines:text
-                 from:start to:end
-                 before:lineNr.
-            self redrawFromVisibleLine:visLine to:nLinesShown
-        ] ifFalse:[
-            w := self widthForScrollBetween:(lineNr + nLines)
-                                        and:(firstLineShown + nLines + nLinesShown).
-            srcY := topMargin + ((visLine - 1) * fontHeight).
-            dstY := srcY + (nLines * fontHeight).
-
-            "/
-            "/ scroll ...
-            "/
-            "
-             stupid: must catchExpose before inserting new
-             stuff - since catchExpose may perform redraws
-            "
-            self catchExpose.
-            self withoutRedrawInsertLines:text
-                 from:start to:end
-                 before:lineNr.
-            self
-                copyFrom:self
-                x:textStartLeft y:srcY
-                toX:textStartLeft y:dstY
-                width:w
-                height:(height - dstY)
-                async:true.
-            self redrawFromVisibleLine:visLine to:(visLine + nLines - 1).
-            self waitForExpose
-        ].
+	nLines := end - start + 1.
+	((visLine + nLines) >= nLinesShown) ifTrue:[
+	    self withoutRedrawInsertLines:text
+		 from:start to:end
+		 before:lineNr.
+	    self redrawFromVisibleLine:visLine to:nLinesShown
+	] ifFalse:[
+	    w := self widthForScrollBetween:(lineNr + nLines)
+					and:(firstLineShown + nLines + nLinesShown).
+	    srcY := topMargin + ((visLine - 1) * fontHeight).
+	    dstY := srcY + (nLines * fontHeight).
+
+	    "/
+	    "/ scroll ...
+	    "/
+	    "
+	     stupid: must catchExpose before inserting new
+	     stuff - since catchExpose may perform redraws
+	    "
+	    self catchExpose.
+	    self withoutRedrawInsertLines:text
+		 from:start to:end
+		 before:lineNr.
+	    self
+		copyFrom:self
+		x:textStartLeft y:srcY
+		toX:textStartLeft y:dstY
+		width:w
+		height:(height - dstY)
+		async:true.
+	    self redrawFromVisibleLine:visLine to:(visLine + nLines - 1).
+	    self waitForExpose
+	].
     ].
     widthOfWidestLine notNil ifTrue:[
-        text do:[:line |
-            widthOfWidestLine := widthOfWidestLine max:(self widthOfLineString:line).
-        ]
+	text do:[:line |
+	    widthOfWidestLine := widthOfWidestLine max:(self widthOfLineString:line).
+	]
     ].
     self textChanged.
 
@@ -3449,38 +3449,38 @@
     |start end nLines wasOn|
 
     lines notNil ifTrue:[
-        nLines := lines size.
-        (nLines == 1) ifTrue:[
-            self insertStringAtCursor:(lines at:1).
-            withCr ifTrue:[
-                self insertCharAtCursor:(Character cr)
-            ]
-        ] ifFalse:[
-            (cursorCol ~~ 1) ifTrue:[
-                self insertStringAtCursor:(lines at:1).
-                self insertCharAtCursor:(Character cr).
-                start := 2
-            ] ifFalse:[
-                start := 1
-            ].
-            withCr ifTrue:[
-                end := nLines
-            ] ifFalse:[
-                end := nLines - 1
-            ].
-            (start <= nLines) ifTrue:[
-                (end >= start) ifTrue:[
-                    wasOn := self hideCursor.
-                    self insertLines:lines from:start to:end before:cursorLine.
-                    self setCursorLine:(cursorLine + (end - start + 1)).
-                    wasOn ifTrue:[self showCursor].
-                ]
-            ].
-            withCr ifFalse:[
-                "last line without cr"
-                self insertStringAtCursor:(lines at:nLines)
-            ]
-        ]
+	nLines := lines size.
+	(nLines == 1) ifTrue:[
+	    self insertStringAtCursor:(lines at:1).
+	    withCr ifTrue:[
+		self insertCharAtCursor:(Character cr)
+	    ]
+	] ifFalse:[
+	    (cursorCol ~~ 1) ifTrue:[
+		self insertStringAtCursor:(lines at:1).
+		self insertCharAtCursor:(Character cr).
+		start := 2
+	    ] ifFalse:[
+		start := 1
+	    ].
+	    withCr ifTrue:[
+		end := nLines
+	    ] ifFalse:[
+		end := nLines - 1
+	    ].
+	    (start <= nLines) ifTrue:[
+		(end >= start) ifTrue:[
+		    wasOn := self hideCursor.
+		    self insertLines:lines from:start to:end before:cursorLine.
+		    self setCursorLine:(cursorLine + (end - start + 1)).
+		    wasOn ifTrue:[self showCursor].
+		]
+	    ].
+	    withCr ifFalse:[
+		"last line without cr"
+		self insertStringAtCursor:(lines at:nLines)
+	    ]
+	]
     ]
 
     "Created: / 18.5.1996 / 15:32:06 / cg"
@@ -3509,7 +3509,7 @@
     startCol := cursorCol.
     self insertStringAtCursor:aString.
     self selectFromLine:startLine col:startCol
-                 toLine:cursorLine col:(cursorCol - 1).
+		 toLine:cursorLine col:(cursorCol - 1).
     self makeSelectionVisible.
 !
 
@@ -3521,12 +3521,12 @@
     line := self lineOfCharacterPosition:charPos.
     col := charPos - (self characterPositionOfLine:line col:1) + 1.
     col == 0 ifTrue:[
-        line > 1 ifTrue:[
-            line := line - 1. 
-            col := (self listAt:line) size + 1. 
-        ] ifFalse:[
-            col := 1.
-        ]
+	line > 1 ifTrue:[
+	    line := line - 1.
+	    col := (self listAt:line) size + 1.
+	] ifFalse:[
+	    col := 1.
+	]
     ].
     self insertString:aString atLine:line col:col
 !
@@ -3543,7 +3543,7 @@
 
     aString isNil ifTrue:[^ self].
     (aString includes:(Character cr)) ifFalse:[
-        ^ self insertStringWithoutCRs:aString atLine:lineNr col:colNr
+	^ self insertStringWithoutCRs:aString atLine:lineNr col:colNr
     ].
 
     l := lineNr.
@@ -3551,19 +3551,19 @@
     start := 1.
     end := aString size.
     [start <= end] whileTrue:[
-        stop := aString indexOf:(Character cr) startingAt:start.
-        stop == 0 ifTrue:[
-            stop := end + 1
-        ].
-        subString := aString copyFrom:start to:(stop - 1).
-        self insertStringWithoutCRs:subString atLine:l col:c.
-        (stop <= end) ifTrue:[
-            c := c + subString size.
-            self insert:(Character cr) atLine:l col:c.
-            l := l + 1.
-            c := 1
-        ].
-        start := stop + 1
+	stop := aString indexOf:(Character cr) startingAt:start.
+	stop == 0 ifTrue:[
+	    stop := end + 1
+	].
+	subString := aString copyFrom:start to:(stop - 1).
+	self insertStringWithoutCRs:subString atLine:l col:c.
+	(stop <= end) ifTrue:[
+	    c := c + subString size.
+	    self insert:(Character cr) atLine:l col:c.
+	    l := l + 1.
+	    c := 1
+	].
+	start := stop + 1
     ]
 
     "Modified: / 10.6.1998 / 19:03:59 / cg"
@@ -3574,12 +3574,12 @@
      handle cr's correctly. A nil argument is interpreted as an empty line."
 
     aString isNil ifTrue:[
-        "new:"
-        self insertCharAtCursor:(Character cr).
-        ^ self
+	"new:"
+	self insertCharAtCursor:(Character cr).
+	^ self
     ].
     (aString includes:(Character cr)) ifFalse:[
-        ^ self insertStringWithoutCRsAtCursor:aString
+	^ self insertStringWithoutCRsAtCursor:aString
     ].
 
     self insertLines:aString asStringCollection withCR:false.
@@ -3592,11 +3592,11 @@
 
     self withoutRedrawInsertStringWithoutCRs:aString atLine:lineNr col:colNr.
     shown ifTrue:[
-        gc font hasOverlappingCharacters ifTrue:[
-            self invalidateLine:lineNr.
-        ] ifFalse:[
-            self redrawLine:lineNr from:colNr
-        ]
+	gc font hasOverlappingCharacters ifTrue:[
+	    self invalidateLine:lineNr.
+	] ifFalse:[
+	    self redrawLine:lineNr from:colNr
+	]
     ]
 
     "Modified: / 09-11-2010 / 13:43:03 / cg"
@@ -3609,19 +3609,19 @@
     |wasOn oldLen newLen deltaLen|
 
     aString size > 0 ifTrue:[
-        wasOn := self hideCursor.
-        (aString includes:Character tab) ifTrue:[
-            self checkForExistingLine:cursorLine.
-            oldLen := (list at:cursorLine) size.
-            self insertString:aString atLine:cursorLine col:cursorCol.
-            newLen := (list at:cursorLine) size.
-            deltaLen := newLen - oldLen.
-        ] ifFalse:[
-            self insertString:aString atLine:(cursorLine ? 1) col:cursorCol.
-            deltaLen := aString size.
-        ].
-        self setCursorCol:(cursorCol + deltaLen).
-        wasOn ifTrue:[self showCursor]
+	wasOn := self hideCursor.
+	(aString includes:Character tab) ifTrue:[
+	    self checkForExistingLine:cursorLine.
+	    oldLen := (list at:cursorLine) size.
+	    self insertString:aString atLine:cursorLine col:cursorCol.
+	    newLen := (list at:cursorLine) size.
+	    deltaLen := newLen - oldLen.
+	] ifFalse:[
+	    self insertString:aString atLine:(cursorLine ? 1) col:cursorCol.
+	    deltaLen := aString size.
+	].
+	self setCursorCol:(cursorCol + deltaLen).
+	wasOn ifTrue:[self showCursor]
     ]
 
     "Modified: / 10.6.1998 / 20:43:52 / cg"
@@ -3644,21 +3644,21 @@
     self checkModificationsAllowed ifFalse:[ ^ self].
 
     self
-        undoableDo:[
-            |line col lineLen|
-
-            line := cursorLine.
-            col := cursorCol.
-            lineLen := (list at:line) size.
-            col > lineLen ifTrue:[
-                self insertString:(String new:col-lineLen) atLine:line col:col+1.
-            ] ifFalse:[
-                self deleteCharsAtLine:line fromCol:col toCol:lineLen.
-            ].
-            self mergeLine:line removeBlanks:true.
-            self cursorLine:line col:col.
-        ]
-        info:'Join'
+	undoableDo:[
+	    |line col lineLen|
+
+	    line := cursorLine.
+	    col := cursorCol.
+	    lineLen := (list at:line) size.
+	    col > lineLen ifTrue:[
+		self insertString:(String new:col-lineLen) atLine:line col:col+1.
+	    ] ifFalse:[
+		self deleteCharsAtLine:line fromCol:col toCol:lineLen.
+	    ].
+	    self mergeLine:line removeBlanks:true.
+	    self cursorLine:line col:col.
+	]
+	info:'Join'
 !
 
 mergeLine:lineNr
@@ -3678,7 +3678,7 @@
 
     len := (self listAt:lineNr) size.
     self nonUndoableDo:[
-        self basicMergeLine:lineNr removeBlanks:removeBlanks.
+	self basicMergeLine:lineNr removeBlanks:removeBlanks.
     ].
     self addUndo:(PasteString new line:lineNr col:len+1 string:(Character cr asString) selected:false).
 !
@@ -3702,29 +3702,29 @@
     endLine := selectionEndLine.
     startCol := selectionStartCol.
     endCol := selectionEndCol.
-    
+
     newSelectionEnd := endCol.
-    
+
     (self characterAtLine:startLine col:startCol) == openingCharacter ifTrue:[
-        (self characterAtLine:endLine col:endCol) == closingCharacter ifTrue:[
-            self deleteCharAtLine:endLine col:endCol.
-            newSelectionEnd := newSelectionEnd-1.
-        ].
-        self deleteCharAtLine:startLine col:startCol.
-        startLine == endLine ifTrue:[
-            newSelectionEnd := newSelectionEnd-1.
-        ]
+	(self characterAtLine:endLine col:endCol) == closingCharacter ifTrue:[
+	    self deleteCharAtLine:endLine col:endCol.
+	    newSelectionEnd := newSelectionEnd-1.
+	].
+	self deleteCharAtLine:startLine col:startCol.
+	startLine == endLine ifTrue:[
+	    newSelectionEnd := newSelectionEnd-1.
+	]
     ] ifFalse:[
-        self insert:closingCharacter atLine:endLine col:endCol+1.
-        newSelectionEnd := newSelectionEnd+1.
-        self insert:openingCharacter atLine:startLine col:startCol.
-        startLine == endLine ifTrue:[
-            newSelectionEnd := newSelectionEnd+1.
-        ]
+	self insert:closingCharacter atLine:endLine col:endCol+1.
+	newSelectionEnd := newSelectionEnd+1.
+	self insert:openingCharacter atLine:startLine col:startCol.
+	startLine == endLine ifTrue:[
+	    newSelectionEnd := newSelectionEnd+1.
+	]
     ].
     self
-        selectFromLine:startLine col:startCol
-        toLine:endLine col:newSelectionEnd.
+	selectFromLine:startLine col:startCol
+	toLine:endLine col:newSelectionEnd.
 
     "Modified (comment): / 06-06-2016 / 11:00:37 / cg"
 !
@@ -3736,32 +3736,32 @@
      line finished|
 
     NoModificationError handle:[:ex |
-        ^ self
+	^ self
     ] do:[
-        lastLine := list size.
-        finished := false.
-        [finished] whileFalse:[
-            (lastLine <= 1) ifTrue:[
-                finished := true
-            ] ifFalse:[
-                line := list at:lastLine.
-                line notNil ifTrue:[
-                    line isBlank ifTrue:[
-                        self basicListAt:lastLine put:nil.
-                        line := nil
-                    ]
-                ].
-                line notNil ifTrue:[
-                    finished := true
-                ] ifFalse:[
-                    lastLine := lastLine - 1
-                ]
-            ]
-        ].
-        (lastLine ~~ list size) ifTrue:[
-            list grow:lastLine.
-            "/ self textChanged
-        ]
+	lastLine := list size.
+	finished := false.
+	[finished] whileFalse:[
+	    (lastLine <= 1) ifTrue:[
+		finished := true
+	    ] ifFalse:[
+		line := list at:lastLine.
+		line notNil ifTrue:[
+		    line isBlank ifTrue:[
+			self basicListAt:lastLine put:nil.
+			line := nil
+		    ]
+		].
+		line notNil ifTrue:[
+		    finished := true
+		] ifFalse:[
+		    lastLine := lastLine - 1
+		]
+	    ]
+	].
+	(lastLine ~~ list size) ifTrue:[
+	    list grow:lastLine.
+	    "/ self textChanged
+	]
     ].
 !
 
@@ -3781,29 +3781,29 @@
     pattern := patternArg string.
     replacePattern := replacePatternArg string.
     (pattern notEmpty and:[ replacePattern notEmpty ]) ifTrue:[
-        self rememberSearchPattern:pattern.
-        self rememberSearchPattern:replacePattern.
-        LastSearchIgnoredCase := ignoreCase.
-        self
-            undoableDo:[
-                all ifTrue:[
-                    self
-                        replaceString:pattern
-                        to:replacePattern
-                        ignoreCase:ignoreCase
-                ] ifFalse:[
-                    (self selectionAsString notNil
-                        and:[ self selectionAsString sameAs:pattern caseSensitive:ignoreCase not ])
-                            ifTrue:[
-                                self replaceSelectionBy:replacePattern.
-                                self
-                                    search:pattern
-                                    ignoreCase:ignoreCase
-                                    forward:(lastSearchDirection = #forward).
-                            ].
-                ]
-            ]
-            info:'Replace'
+	self rememberSearchPattern:pattern.
+	self rememberSearchPattern:replacePattern.
+	LastSearchIgnoredCase := ignoreCase.
+	self
+	    undoableDo:[
+		all ifTrue:[
+		    self
+			replaceString:pattern
+			to:replacePattern
+			ignoreCase:ignoreCase
+		] ifFalse:[
+		    (self selectionAsString notNil
+			and:[ self selectionAsString sameAs:pattern caseSensitive:ignoreCase not ])
+			    ifTrue:[
+				self replaceSelectionBy:replacePattern.
+				self
+				    search:pattern
+				    ignoreCase:ignoreCase
+				    forward:(lastSearchDirection = #forward).
+			    ].
+		]
+	    ]
+	    info:'Replace'
     ]
 
     "Created: / 11-07-2006 / 11:19:57 / fm"
@@ -3816,10 +3816,10 @@
 
     wasOn := self hideCursor.
     aCharacter == (Character cr) ifTrue:[
-        self cursorReturn
+	self cursorReturn
     ] ifFalse:[
-        self replace:aCharacter atLine:cursorLine col:cursorCol.
-        self cursorRight.
+	self replace:aCharacter atLine:cursorLine col:cursorCol.
+	self cursorRight.
     ].
     self makeCursorVisibleAndShowCursor:wasOn.
 
@@ -3851,7 +3851,7 @@
 
     originalLine := self listAt:lineNr.
     originalLine isNil ifTrue:[
-        self checkForExistingLine:lineNr
+	self checkForExistingLine:lineNr
     ].
     self list at:lineNr put:newText.
     self addUndo:(ReplaceLine line:lineNr string:originalLine info:'replace').
@@ -3869,22 +3869,22 @@
     |line col nLines wasOn|
 
     lines notNil ifTrue:[
-        wasOn := self hideCursor.
-        nLines := lines size.
-        line := cursorLine.
-        col := cursorCol.
-        lines keysAndValuesDo:[:i :l |
-            self replaceString:(l ? '') atLine:line col:col.
-            (i ~~ nLines or:[withCr]) ifTrue:[
-                line := line + 1.
-                col := 1.
-            ] ifFalse:[
-                col := col + (l size).
-            ]
-        ].
-        self cursorLine:line col:col.
-        self makeCursorVisibleAndShowCursor:wasOn.
-        "/ wasOn ifTrue:[self showCursor].
+	wasOn := self hideCursor.
+	nLines := lines size.
+	line := cursorLine.
+	col := cursorCol.
+	lines keysAndValuesDo:[:i :l |
+	    self replaceString:(l ? '') atLine:line col:col.
+	    (i ~~ nLines or:[withCr]) ifTrue:[
+		line := line + 1.
+		col := 1.
+	    ] ifFalse:[
+		col := col + (l size).
+	    ]
+	].
+	self cursorLine:line col:col.
+	self makeCursorVisibleAndShowCursor:wasOn.
+	"/ wasOn ifTrue:[self showCursor].
     ]
 
     "Created: / 18-05-1996 / 15:32:06 / cg"
@@ -3919,50 +3919,50 @@
 
     sel := self selectionAsString.
     sel isNil ifTrue:[
-        selStartLine := l.
-        selStartCol := c.
+	selStartLine := l.
+	selStartCol := c.
     ] ifFalse:[
-        selStartLine := selectionStartLine.
-        selStartCol := selectionStartCol.
-
-        self setLastStringToReplace: sel.
-
-        self deleteSelection.
-        replacing := true.
-        lastReplacementInfo rememberReplacement.
-        lastReplacementInfo lastReplacement: ''.
-        lastReplacementInfo stillCollectingInput:true.
-        undoSupport actionInfo:'replace'.
+	selStartLine := selectionStartLine.
+	selStartCol := selectionStartCol.
+
+	self setLastStringToReplace: sel.
+
+	self deleteSelection.
+	replacing := true.
+	lastReplacementInfo rememberReplacement.
+	lastReplacementInfo lastReplacement: ''.
+	lastReplacementInfo stillCollectingInput:true.
+	undoSupport actionInfo:'replace'.
     ].
 
     something isCharacter ifTrue:[
-        lastReplacementInfo lastReplacement notNil ifTrue:[
-            lastReplacementInfo stillCollectingInput ifTrue:[
-                lastReplacementInfo lastReplacement: (lastReplacementInfo lastReplacement copyWith:something).
-            ].
-        ].
-        self isInInsertMode ifTrue:[
-            self insertCharAtCursor:something
-        ] ifFalse:[
-            self replaceCharAtCursor:something
-        ]
+	lastReplacementInfo lastReplacement notNil ifTrue:[
+	    lastReplacementInfo stillCollectingInput ifTrue:[
+		lastReplacementInfo lastReplacement: (lastReplacementInfo lastReplacement copyWith:something).
+	    ].
+	].
+	self isInInsertMode ifTrue:[
+	    self insertCharAtCursor:something
+	] ifFalse:[
+	    self replaceCharAtCursor:something
+	]
     ] ifFalse:[
-        something isString ifTrue:[
-            lastReplacementInfo lastReplacement: something.
-            self isInInsertMode ifTrue:[
-                self insertStringAtCursor:something
-            ] ifFalse:[
-                self replaceStringAtCursor:something
-            ]
-        ] ifFalse:[
-            Transcript showCR:'EditTextView: non String-or-Character in replace'.
-        ].
+	something isString ifTrue:[
+	    lastReplacementInfo lastReplacement: something.
+	    self isInInsertMode ifTrue:[
+		self insertStringAtCursor:something
+	    ] ifFalse:[
+		self replaceStringAtCursor:something
+	    ]
+	] ifFalse:[
+	    Transcript showCR:'EditTextView: non String-or-Character in replace'.
+	].
     ].
     keep ifTrue:[
-        self cursorLine:l col:c
+	self cursorLine:l col:c
     ].
     selectNewText ifTrue:[
-        self selectFromLine:selStartLine col:selStartCol toLine:cursorLine col:cursorCol-1
+	self selectFromLine:selStartLine col:selStartCol toLine:cursorLine col:cursorCol-1
     ]
 
     "Modified: 9.10.1996 / 16:14:35 / cg"
@@ -3990,20 +3990,20 @@
     count := 0.
     continue := true.
     [ continue ] whileTrue:[
-        (self selectionAsString notNil
-        and:[ self selectionAsString sameAs:aString caseSensitive:ignoreCase not ])
-            ifTrue:[
-                self replaceSelectionBy:aNewString.
-                count := count + 1.
-            ].
-        self
-            searchFwd:aString
-            ignoreCase:ignoreCase
-            ifAbsent:[
-                Dialog information:('%1 has been replaced by %2 %3 times' 
-                                    bindWith:aString with:aNewString with:count).
-                continue := false.
-            ].
+	(self selectionAsString notNil
+	and:[ self selectionAsString sameAs:aString caseSensitive:ignoreCase not ])
+	    ifTrue:[
+		self replaceSelectionBy:aNewString.
+		count := count + 1.
+	    ].
+	self
+	    searchFwd:aString
+	    ignoreCase:ignoreCase
+	    ifAbsent:[
+		Dialog information:('%1 has been replaced by %2 %3 times'
+				    bindWith:aString with:aNewString with:count).
+		continue := false.
+	    ].
     ].
 
     "Created: / 10-07-2006 / 16:42:48 / fm"
@@ -4016,31 +4016,31 @@
 
     wasOn := self hideCursor.
     (aString includes:Character tab) ifTrue:[
-        "/ need special care for TAB (to move cursor correctly)
-        i1 := 1.
-        [i1 ~~ 0] whileTrue:[
-            i2 := aString indexOf:Character tab startingAt:i1.
-            i2 ~~ 0 ifTrue:[
-                i1 ~~ i2 ifTrue:[
-                    self replaceString:(aString copyFrom:i1 to:i2-1) atLine:cursorLine col:cursorCol.
-                    self cursorCol:(cursorCol + (i2 - i1)).
-                ].
-                self replaceTABAtCursor.
-                i2 := i2 + 1.
-            ] ifFalse:[
-                self replaceString:(aString copyFrom:i1) atLine:cursorLine col:cursorCol.
-                self cursorCol:(cursorCol + (aString size - i1 + 1)).
-            ].
-            i1 := i2.
-        ]
+	"/ need special care for TAB (to move cursor correctly)
+	i1 := 1.
+	[i1 ~~ 0] whileTrue:[
+	    i2 := aString indexOf:Character tab startingAt:i1.
+	    i2 ~~ 0 ifTrue:[
+		i1 ~~ i2 ifTrue:[
+		    self replaceString:(aString copyFrom:i1 to:i2-1) atLine:cursorLine col:cursorCol.
+		    self cursorCol:(cursorCol + (i2 - i1)).
+		].
+		self replaceTABAtCursor.
+		i2 := i2 + 1.
+	    ] ifFalse:[
+		self replaceString:(aString copyFrom:i1) atLine:cursorLine col:cursorCol.
+		self cursorCol:(cursorCol + (aString size - i1 + 1)).
+	    ].
+	    i1 := i2.
+	]
     ] ifFalse:[
-        self replaceString:aString atLine:cursorLine col:cursorCol.
-        self setValidatedCursorCol:(cursorCol + aString size).
-        "/ self cursorCol:(cursorCol + aString size).
+	self replaceString:aString atLine:cursorLine col:cursorCol.
+	self setValidatedCursorCol:(cursorCol + aString size).
+	"/ self cursorCol:(cursorCol + aString size).
     ].
     wasOn ifTrue:[
-        self sensor pushUserEvent:#makeCursorVisibleAndShowCursor: for:self withArguments:{ wasOn } 
-        "/ self makeCursorVisibleAndShowCursor:wasOn.
+	self sensor pushUserEvent:#makeCursorVisibleAndShowCursor: for:self withArguments:{ wasOn }
+	"/ self makeCursorVisibleAndShowCursor:wasOn.
     ].
 
     "Created: / 9.6.1998 / 20:33:20 / cg"
@@ -4071,7 +4071,7 @@
     endCol := cursorCol-1.
     endLine := cursorLine.
     self cursorToPreviousWord.
-    beginCol := cursorCol.     
+    beginCol := cursorCol.
     beginLine := cursorLine.
     self cursorLine:savCursorLine col:savCursorCol.
     self selectFromLine:beginLine col:beginCol toLine:endLine col:endCol.
@@ -4092,8 +4092,8 @@
      and 8-col tabs"
 
     (tabPositions == self class tab4Positions)
-         ifTrue:[self setTab8]
-         ifFalse:[self setTab4]
+	 ifTrue:[self setTab8]
+	 ifFalse:[self setTab4]
 
     "Created: / 06-06-2016 / 11:02:07 / cg"
 !
@@ -4139,7 +4139,7 @@
 
     self basicWithoutRedrawInsertLines:lines from:start to:end before:lineNr.
     self isReadOnly ifFalse:[
-        self addUndo:(DeleteRange line1:lineNr col1:1 line2:lineNr+end-start+1 col2:0 info:'insert').
+	self addUndo:(DeleteRange line1:lineNr col1:1 line2:lineNr+end-start+1 col2:0 info:'insert').
     ].
 !
 
@@ -4158,52 +4158,52 @@
     self checkModificationsAllowed ifFalse:[ ^ self].
 
     self hasSelection ifFalse:[
-        self selectLine:cursorLine.
+	self selectLine:cursorLine.
     ].
     string := self selectionAsString.
     string isEmptyOrNil ifTrue:[
-        Dialog information:(resources string:'Nothing selected.').
-        ^ self.
+	Dialog information:(resources string:'Nothing selected.').
+	^ self.
     ].
 
     answerString := Dialog request:(resources string:'Line length (wrap after how many chars)?') initialAnswer:80.
     lineLength := Number readFrom:answerString onError:nil.
     lineLength isNil ifTrue:[^ self].
     lineLength < 1 ifTrue:[
-        lineLength := 1.
+	lineLength := 1.
     ].
 
     self
-        undoableDo:[
-            |inStream line col lineLen lastGoodCol lastStartCol word|
-
-            line := selectionStartLine.
-            col := selectionStartCol.
-
-            self cutSelection.
-            self cursorLine:line col:col.
-
-            lastGoodCol := col.
-
-            inStream := string readStream.
-            [ inStream atEnd ] whileFalse:[
-                [inStream atEnd not and:[inStream peek isSeparator]] whileTrue:[ inStream next ].
-                word := WriteStream on:(String new:10).
-                [inStream atEnd not and:[inStream peek isSeparator not]] whileTrue:[ word nextPut:inStream next ].
-                (col + 1 + word size > lineLength) ifTrue:[
-                    self insertCharAtCursor:(Character cr).
-                    col := 1.
-                ] ifFalse:[
-                    col ~~ 1 ifTrue:[ 
-                        self insertStringAtCursor:' '.
-                        col := col + 1.
-                    ]    
-               ].
-               self insertStringAtCursor:word contents.
-               col := col + word size.
-            ].
-        ]
-        info:'Wrap'
+	undoableDo:[
+	    |inStream line col lineLen lastGoodCol lastStartCol word|
+
+	    line := selectionStartLine.
+	    col := selectionStartCol.
+
+	    self cutSelection.
+	    self cursorLine:line col:col.
+
+	    lastGoodCol := col.
+
+	    inStream := string readStream.
+	    [ inStream atEnd ] whileFalse:[
+		[inStream atEnd not and:[inStream peek isSeparator]] whileTrue:[ inStream next ].
+		word := CharacterWriteStream new.
+		[inStream atEnd not and:[inStream peek isSeparator not]] whileTrue:[ word nextPut:inStream next ].
+		(col + 1 + word size > lineLength) ifTrue:[
+		    self insertCharAtCursor:(Character cr).
+		    col := 1.
+		] ifFalse:[
+		    col ~~ 1 ifTrue:[
+			self insertStringAtCursor:' '.
+			col := col + 1.
+		    ]
+	       ].
+	       self insertStringAtCursor:word contents.
+	       col := col + word size.
+	    ].
+	]
+	info:'Wrap'
 
     "Modified: / 01-03-2012 / 19:56:22 / cg"
 ! !
@@ -4218,15 +4218,15 @@
     self unselect.
 
     cursorLine == lineNr ifTrue:[
-        cursorCol >= startCol ifTrue:[
-            cursorCol >= endCol ifTrue:[
-                cursorCol := startCol.
-            ] ifFalse:[
-                cursorCol := cursorCol - (endCol - startCol + 1).
-                "/ self assert:(cursorCol >= 0).
-                cursorCol := cursorCol max:1.
-            ]
-        ].
+	cursorCol >= startCol ifTrue:[
+	    cursorCol >= endCol ifTrue:[
+		cursorCol := startCol.
+	    ] ifFalse:[
+		cursorCol := cursorCol - (endCol - startCol + 1).
+		"/ self assert:(cursorCol >= 0).
+		cursorCol := cursorCol max:1.
+	    ]
+	].
     ].
 
     line := self listAt:lineNr.
@@ -4239,50 +4239,50 @@
     endCol > lineSize ifFalse:[ stop  := endCol ] ifTrue:[ stop  := lineSize ].
 
     stop >= start ifTrue:[
-        start ~~ 1 ifTrue:[ newLine := line copyFrom:1 to:(start-1) ]
-                  ifFalse:[ newLine := '' ].
-
-        stop == lineSize ifFalse:[
-            line bitsPerCharacter > newLine bitsPerCharacter ifTrue:[
-                newLine := line string species fromString:newLine.
-            ].
-            newLine := newLine, (line copyFrom:(stop + 1) to:lineSize)
-        ].
-
-        (trimBlankLines and:[newLine isBlank]) ifTrue:[
-            newLine := nil
-        ].
-
-        prevWidth := self widthOfLine:lineNr.
-
-        self basicListAt:lineNr put:newLine.
-
-        (prevWidth = widthOfWidestLine) ifTrue:[
-            "/ remember old width of this line,
-            "/ only clear widthOfWidestLine, if this lines
-            "/ length was (one of) the longest.
-            "/ avoids slow delete with huge texts.
-            widthOfWidestLine := nil.   "i.e. unknown"
-
-            "/ scroll left if reqiured
-            viewOrigin x > 0 ifTrue:[
-                newWidth := self widthOfLine:lineNr.
-                newWidth < (viewOrigin x + width) ifTrue:[
-                    self scrollHorizontalTo:(newWidth
-                                             - width
-                                             + margin + margin
-                                             + (gc font widthOf:'  '))
-                ]
-            ].
-            self textChanged.
-        ] ifFalse:[
-            self textChanged "/ textChangedButNoSizeChange
-        ].
-        gc font hasOverlappingCharacters ifTrue:[
-            self invalidateLine:lineNr.
-        ] ifFalse:[
-            self redrawLine:lineNr from:start.
-        ].
+	start ~~ 1 ifTrue:[ newLine := line copyFrom:1 to:(start-1) ]
+		  ifFalse:[ newLine := '' ].
+
+	stop == lineSize ifFalse:[
+	    line bitsPerCharacter > newLine bitsPerCharacter ifTrue:[
+		newLine := line string species fromString:newLine.
+	    ].
+	    newLine := newLine, (line copyFrom:(stop + 1) to:lineSize)
+	].
+
+	(trimBlankLines and:[newLine isBlank]) ifTrue:[
+	    newLine := nil
+	].
+
+	prevWidth := self widthOfLine:lineNr.
+
+	self basicListAt:lineNr put:newLine.
+
+	(prevWidth = widthOfWidestLine) ifTrue:[
+	    "/ remember old width of this line,
+	    "/ only clear widthOfWidestLine, if this lines
+	    "/ length was (one of) the longest.
+	    "/ avoids slow delete with huge texts.
+	    widthOfWidestLine := nil.   "i.e. unknown"
+
+	    "/ scroll left if reqiured
+	    viewOrigin x > 0 ifTrue:[
+		newWidth := self widthOfLine:lineNr.
+		newWidth < (viewOrigin x + width) ifTrue:[
+		    self scrollHorizontalTo:(newWidth
+					     - width
+					     + margin + margin
+					     + (gc font widthOf:'  '))
+		]
+	    ].
+	    self textChanged.
+	] ifFalse:[
+	    self textChanged "/ textChangedButNoSizeChange
+	].
+	gc font hasOverlappingCharacters ifTrue:[
+	    self invalidateLine:lineNr.
+	] ifFalse:[
+	    self redrawLine:lineNr from:start.
+	].
     ].
 
     "Modified: / 09-11-2010 / 13:42:45 / cg"
@@ -4301,7 +4301,7 @@
     "/ isnt this the same as:
     "/ self deleteLinesWithoutRedrawFrom:startLineNr to:endLineNr.
     startLineNr <= list size ifTrue:[
-        self basicListRemoveFromIndex:startLineNr toIndex:(endLineNr min:list size).
+	self basicListRemoveFromIndex:startLineNr toIndex:(endLineNr min:list size).
     ].
     "/ TODO: remember old maxwidth of linerange,
     "/ only clear widthOfWidestLine, if this max
@@ -4314,7 +4314,7 @@
 
     nLines := list size.
     (firstLineShown >= nLines) ifTrue:[
-        self makeLineVisible:nLines
+	self makeLineVisible:nLines
     ].
     wasOn ifTrue:[self showCursor].
 
@@ -4350,8 +4350,8 @@
     self checkModificationsAllowed ifFalse:[ ^ self].
 
     aCharacter == (Character cr) ifTrue:[
-        self splitLine:lineNr before:colNr.
-        ^ self
+	self splitLine:lineNr before:colNr.
+	^ self
     ].
 
     drawCharacterOnly := false.
@@ -4360,92 +4360,92 @@
     lineSize := line size.
 
     self st80EditMode ifFalse:[
-        (trimBlankLines
-        and:[colNr > lineSize
-        and:[aCharacter == Character space]]) ifTrue:[
-            ^ self
-        ]
+	(trimBlankLines
+	and:[colNr > lineSize
+	and:[aCharacter == Character space]]) ifTrue:[
+	    ^ self
+	]
     ].
 
     (lineSize == 0) ifTrue:[
-        newLine := aCharacter asString species new:colNr.
-        drawCharacterOnly := true
+	newLine := aCharacter asString species new:colNr.
+	drawCharacterOnly := true
     ] ifFalse: [
-        (colNr > lineSize) ifTrue: [
-            colNr == (lineSize +1) ifTrue:[
-                attribute := line emphasisAt:lineSize
-            ].
-            newLine := line species new:colNr.
-            newLine replaceFrom:1 to:lineSize with:line startingAt:1.
-            drawCharacterOnly := true
-        ] ifFalse: [
-            attribute := line emphasisAt:colNr.
-            newLine   := line species new:(lineSize + 1).
-
-            newLine replaceFrom:1 to:(colNr - 1) with:line startingAt:1.
-            newLine replaceFrom:(colNr + 1) to:(lineSize + 1) with:line startingAt:colNr
-        ]
+	(colNr > lineSize) ifTrue: [
+	    colNr == (lineSize +1) ifTrue:[
+		attribute := line emphasisAt:lineSize
+	    ].
+	    newLine := line species new:colNr.
+	    newLine replaceFrom:1 to:lineSize with:line startingAt:1.
+	    drawCharacterOnly := true
+	] ifFalse: [
+	    attribute := line emphasisAt:colNr.
+	    newLine   := line species new:(lineSize + 1).
+
+	    newLine replaceFrom:1 to:(colNr - 1) with:line startingAt:1.
+	    newLine replaceFrom:(colNr + 1) to:(lineSize + 1) with:line startingAt:colNr
+	]
     ].
 
     aCharacter asString bitsPerCharacter > newLine bitsPerCharacter ifTrue:[
-        newLine := aCharacter asString species fromString:newLine.
-        line isText ifTrue:[
-            newLine := newLine asText
-        ]
+	newLine := aCharacter asString species fromString:newLine.
+	line isText ifTrue:[
+	    newLine := newLine asText
+	]
     ].
     newLine at:colNr put:aCharacter.
 
     attribute notNil ifTrue:[
-        newLine emphasisAt:colNr put:attribute.
+	newLine emphasisAt:colNr put:attribute.
     ].
 
     aCharacter == (Character tab) ifTrue:[
-        newLine := self withTabsExpanded:newLine.
-        drawCharacterOnly := false
+	newLine := self withTabsExpanded:newLine.
+	drawCharacterOnly := false
     ].
 
     self basicListAt:lineNr put:(newLine ifNil:[newLine] ifNotNil:[newLine asSingleByteStringIfPossible]).
     widthOfWidestLine notNil ifTrue:[
-        widthOfWidestLine := widthOfWidestLine max:(self widthOfLineString:newLine).
+	widthOfWidestLine := widthOfWidestLine max:(self widthOfLineString:newLine).
     ].
     self textChanged.
     shown ifTrue:[
-        "/ care for italic text - in this case, we must also
-        "/ redraw the character before the insertion in order
-        "/ to fix the slanted piece of the character.
-        "/ (but we must clip, to avoid destoying the character before)
-        (newLine notNil and:[newLine isText]) ifTrue:[
-            colNr > 1 ifTrue:[
-                cursorVisibleLine notNil ifTrue:[
-                    oldClip := self clippingRectangleOrNil.
-                    x := (self xOfCol:colNr-1 inVisibleLine:cursorVisibleLine) - viewOrigin x.
-                    y := self yOfVisibleLine:cursorVisibleLine.
-
-                    gc font hasOverlappingCharacters ifTrue:[
-                        self invalidateLine:lineNr.
-                    ] ifFalse:[
-                        drawCharacterOnly ifTrue:[
-                            self clippingRectangle:(x@y extent:((gc font width * 2) @ fontHeight)).
-                            self redrawLine:lineNr from:colNr-1 to:colNr
-                        ] ifFalse:[
-                            self clippingRectangle:(x@y extent:((width - x) @ fontHeight)).
-                            self redrawLine:lineNr from:colNr-1
-                        ].
-                        self clippingRectangle:oldClip.
-                    ].
-                ].
-                ^ self.
-            ].
-        ].
-        gc font hasOverlappingCharacters ifTrue:[
-            self invalidateLine:lineNr.
-        ] ifFalse:[
-            drawCharacterOnly ifTrue:[
-                self redrawLine:lineNr col:colNr
-            ] ifFalse:[
-                self redrawLine:lineNr from:colNr
-            ]
-        ]
+	"/ care for italic text - in this case, we must also
+	"/ redraw the character before the insertion in order
+	"/ to fix the slanted piece of the character.
+	"/ (but we must clip, to avoid destoying the character before)
+	(newLine notNil and:[newLine isText]) ifTrue:[
+	    colNr > 1 ifTrue:[
+		cursorVisibleLine notNil ifTrue:[
+		    oldClip := self clippingRectangleOrNil.
+		    x := (self xOfCol:colNr-1 inVisibleLine:cursorVisibleLine) - viewOrigin x.
+		    y := self yOfVisibleLine:cursorVisibleLine.
+
+		    gc font hasOverlappingCharacters ifTrue:[
+			self invalidateLine:lineNr.
+		    ] ifFalse:[
+			drawCharacterOnly ifTrue:[
+			    self clippingRectangle:(x@y extent:((gc font width * 2) @ fontHeight)).
+			    self redrawLine:lineNr from:colNr-1 to:colNr
+			] ifFalse:[
+			    self clippingRectangle:(x@y extent:((width - x) @ fontHeight)).
+			    self redrawLine:lineNr from:colNr-1
+			].
+			self clippingRectangle:oldClip.
+		    ].
+		].
+		^ self.
+	    ].
+	].
+	gc font hasOverlappingCharacters ifTrue:[
+	    self invalidateLine:lineNr.
+	] ifFalse:[
+	    drawCharacterOnly ifTrue:[
+		self redrawLine:lineNr col:colNr
+	    ] ifFalse:[
+		self redrawLine:lineNr from:colNr
+	    ]
+	]
     ]
 
     "Modified: / 09-11-2010 / 13:43:18 / cg"
@@ -4469,36 +4469,36 @@
     |leftPart rightPart bothParts nextLineNr i|
 
     (list notNil and:[(list size) >= lineNr]) ifFalse:[
-        "/ empty list or beyond end of text
-        ^ self
+	"/ empty list or beyond end of text
+	^ self
     ].
     leftPart := self listAt:lineNr.
 
     leftPart isNil ifTrue:[
-        leftPart := ''.
-        autoIndent ifTrue:[
-            (i := self leftIndentForLine:cursorLine) == 0 ifFalse:[
-                leftPart := String new:i
-            ]
-        ]
+	leftPart := ''.
+	autoIndent ifTrue:[
+	    (i := self leftIndentForLine:cursorLine) == 0 ifFalse:[
+		leftPart := String new:i
+	    ]
+	]
     ].
     self cursorLine:lineNr col:((leftPart size) + 1).
     nextLineNr := self validateCursorLine:(lineNr + 1).
 
     nextLineNr > (list size) ifFalse:[
-        (rightPart := self listAt:nextLineNr) isNil ifTrue:[
-            rightPart := ''
-        ] ifFalse:[
-            removeBlanks ifTrue:[
-                rightPart := rightPart withoutLeadingSeparators.
-            ]
-        ].
-
-        bothParts := leftPart , rightPart.
-        (trimBlankLines and:[bothParts isBlank]) ifTrue:[bothParts := nil].
-        self basicListAt:lineNr put:bothParts.
-        self redrawLine:lineNr.
-        self deleteLine:nextLineNr
+	(rightPart := self listAt:nextLineNr) isNil ifTrue:[
+	    rightPart := ''
+	] ifFalse:[
+	    removeBlanks ifTrue:[
+		rightPart := rightPart withoutLeadingSeparators.
+	    ]
+	].
+
+	bothParts := leftPart , rightPart.
+	(trimBlankLines and:[bothParts isBlank]) ifTrue:[bothParts := nil].
+	self basicListAt:lineNr put:bothParts.
+	self redrawLine:lineNr.
+	self deleteLine:nextLineNr
     ]
 
     "Created: 9.9.1997 / 09:27:38 / cg"
@@ -4513,7 +4513,7 @@
     self checkModificationsAllowed ifFalse:[ ^ self].
 
     aCharacter == (Character cr) ifTrue:[
-        ^ self
+	^ self
     ].
 
     drawCharacterOnly := true.
@@ -4524,40 +4524,40 @@
     (trimBlankLines
     and:[colNr > lineSize
     and:[aCharacter == Character space]]) ifTrue:[
-        ^ self
+	^ self
     ].
 
     (lineSize == 0) ifTrue:[
-        newLine := aCharacter asString species new:colNr.
+	newLine := aCharacter asString species new:colNr.
     ] ifFalse: [
-        (aCharacter bitsPerCharacter > line bitsPerCharacter) ifTrue:[ 
-            newLineSpecies := aCharacter stringSpecies
-        ] ifFalse:[
-            newLineSpecies := line species
-        ].
-        newLine := newLineSpecies new:(colNr max:lineSize).
-        newLine replaceFrom:1 to:lineSize with:line startingAt:1.
+	(aCharacter bitsPerCharacter > line bitsPerCharacter) ifTrue:[
+	    newLineSpecies := aCharacter stringSpecies
+	] ifFalse:[
+	    newLineSpecies := line species
+	].
+	newLine := newLineSpecies new:(colNr max:lineSize).
+	newLine replaceFrom:1 to:lineSize with:line startingAt:1.
     ].
     newLine at:colNr put:aCharacter.
     aCharacter == (Character tab) ifTrue:[
-        newLine := self withTabsExpanded:newLine.
-        drawCharacterOnly := false
+	newLine := self withTabsExpanded:newLine.
+	drawCharacterOnly := false
     ].
     self basicListAt:lineNr put:(newLine ifNil:[newLine] ifNotNil:[newLine asSingleByteStringIfPossible]).
     widthOfWidestLine notNil ifTrue:[
-        widthOfWidestLine := widthOfWidestLine max:(self widthOfLineString:newLine).
+	widthOfWidestLine := widthOfWidestLine max:(self widthOfLineString:newLine).
     ].
     self textChanged.
     shown ifTrue:[
-        gc font hasOverlappingCharacters ifTrue:[
-            self invalidateLine:lineNr.
-        ] ifFalse:[
-            drawCharacterOnly ifTrue:[
-                self redrawLine:lineNr col:colNr
-            ] ifFalse:[
-                self redrawLine:lineNr from:colNr
-            ]
-        ]
+	gc font hasOverlappingCharacters ifTrue:[
+	    self invalidateLine:lineNr.
+	] ifFalse:[
+	    drawCharacterOnly ifTrue:[
+		self redrawLine:lineNr col:colNr
+	    ] ifFalse:[
+		self redrawLine:lineNr from:colNr
+	    ]
+	]
     ]
 
     "Created: / 06-03-1996 / 12:29:20 / cg"
@@ -4579,32 +4579,32 @@
 
     endCol := colNr + aString size - 1.
     (lineSize == 0) ifTrue:[
-        newLine := aString species new:endCol.
+	newLine := aString species new:endCol.
     ] ifFalse: [
-        (aString bitsPerCharacter > line bitsPerCharacter) ifTrue:[ 
-            newLineSpecies := aString stringSpecies
-        ] ifFalse:[
-            newLineSpecies := line species
-        ].
-
-        newLine := newLineSpecies new:(endCol max:lineSize).
-        newLine replaceFrom:1 to:lineSize with:line startingAt:1.
+	(aString bitsPerCharacter > line bitsPerCharacter) ifTrue:[
+	    newLineSpecies := aString stringSpecies
+	] ifFalse:[
+	    newLineSpecies := line species
+	].
+
+	newLine := newLineSpecies new:(endCol max:lineSize).
+	newLine replaceFrom:1 to:lineSize with:line startingAt:1.
     ].
     newLine replaceFrom:colNr with:aString.
     (aString includes:(Character tab)) ifTrue:[
-        newLine := self withTabsExpanded:newLine.
+	newLine := self withTabsExpanded:newLine.
     ].
     self basicListAt:lineNr put:(newLine ifNil:[newLine] ifNotNil:[newLine asSingleByteStringIfPossible]).
     widthOfWidestLine notNil ifTrue:[
-        widthOfWidestLine := widthOfWidestLine max:(self widthOfLineString:newLine).
+	widthOfWidestLine := widthOfWidestLine max:(self widthOfLineString:newLine).
     ].
     self textChanged.
     shown ifTrue:[
-        gc font hasOverlappingCharacters ifTrue:[
-            self invalidateLine:lineNr.
-        ] ifFalse:[
-            self redrawLine:lineNr from:colNr
-        ]
+	gc font hasOverlappingCharacters ifTrue:[
+	    self invalidateLine:lineNr.
+	] ifFalse:[
+	    self redrawLine:lineNr from:colNr
+	]
     ]
 
     "Created: / 11-06-1998 / 10:38:32 / cg"
@@ -4622,50 +4622,50 @@
     lineNr > (list size) ifTrue:[ ^ self ].
 
     (colNr == 1) ifTrue:[
-        self nonUndoableDo:[
-            self insertLine:nil before:lineNr.
-        ].
-        ^ self
+	self nonUndoableDo:[
+	    self insertLine:nil before:lineNr.
+	].
+	^ self
     ].
 
     line := list at:lineNr.
     line notNil ifTrue:[
-        lineSize := line size.
-        (colNr <= lineSize) ifTrue:[
-            rightRest := line copyFrom:colNr to:lineSize.
-            (colNr > 1) ifTrue:[
-                leftRest := line copyTo:(colNr - 1)
-            ]
-        ] ifFalse:[
-            leftRest := line
-        ]
+	lineSize := line size.
+	(colNr <= lineSize) ifTrue:[
+	    rightRest := line copyFrom:colNr to:lineSize.
+	    (colNr > 1) ifTrue:[
+		leftRest := line copyTo:(colNr - 1)
+	    ]
+	] ifFalse:[
+	    leftRest := line
+	]
     ].
     leftRest notNil ifTrue:[
-        (trimBlankLines and:[leftRest isBlank]) ifTrue:[leftRest := nil]
+	(trimBlankLines and:[leftRest isBlank]) ifTrue:[leftRest := nil]
     ].
     self basicListAt:lineNr put:leftRest.
     self nonUndoableDo:[
-        self withoutRedrawInsertLine:rightRest before:(lineNr + 1).
+	self withoutRedrawInsertLine:rightRest before:(lineNr + 1).
     ].
     visLine := self listLineToVisibleLine:(lineNr).
     visLine notNil ifTrue:[
-        w := self widthForScrollBetween:lineNr
-                                    and:(firstLineShown + nLinesShown).
-        srcY := topMargin + (visLine * fontHeight).
-        h := ((nLinesShown - visLine - 1) * fontHeight).
-        (mustWait := (w > 0 and:[h > 0])) ifTrue:[
-            self catchExpose.
-            self
-                copyFrom:self
-                x:textStartLeft y:srcY
-                toX:textStartLeft y:(srcY + fontHeight)
-                width:w
-                height:((nLinesShown - visLine - 1) * fontHeight)
-                async:true.
-        ].
-        self redrawLine:lineNr.
-        self redrawLine:(lineNr + 1).
-        mustWait ifTrue:[self waitForExpose]
+	w := self widthForScrollBetween:lineNr
+				    and:(firstLineShown + nLinesShown).
+	srcY := topMargin + (visLine * fontHeight).
+	h := ((nLinesShown - visLine - 1) * fontHeight).
+	(mustWait := (w > 0 and:[h > 0])) ifTrue:[
+	    self catchExpose.
+	    self
+		copyFrom:self
+		x:textStartLeft y:srcY
+		toX:textStartLeft y:(srcY + fontHeight)
+		width:w
+		height:((nLinesShown - visLine - 1) * fontHeight)
+		async:true.
+	].
+	self redrawLine:lineNr.
+	self redrawLine:(lineNr + 1).
+	mustWait ifTrue:[self waitForExpose]
     ].
     widthOfWidestLine := nil. "/ unknown
     self textChanged.
@@ -4683,24 +4683,24 @@
     nLines := end - start + 1.
     newLines := Array new:(lines size).
     start to:end do:[:index |
-        newLine := lines at:index.
-        newLine notNil ifTrue:[
-            newLine isString ifTrue:[
-                newLine isBlank ifTrue:[
-                    newLine := nil
-                ] ifFalse:[
-                    (newLine includes:(Character tab)) ifTrue:[
-                        newLine := self withTabs:(ListView tab8Positions) expand:newLine
-                    ]
-                ]
-            ]
-        ].
-        newLines at:index put:newLine
+	newLine := lines at:index.
+	newLine notNil ifTrue:[
+	    newLine isString ifTrue:[
+		newLine isBlank ifTrue:[
+		    newLine := nil
+		] ifFalse:[
+		    (newLine includes:(Character tab)) ifTrue:[
+			newLine := self withTabs:(ListView tab8Positions) expand:newLine
+		    ]
+		]
+	    ]
+	].
+	newLines at:index put:newLine
     ].
     list isNil ifTrue: [
-        list := StringCollection new:(lineNr + nLines + 1)
+	list := StringCollection new:(lineNr + nLines + 1)
     ] ifFalse: [
-        list grow:((list size + nLines) max:(lineNr + nLines - 1))
+	list grow:((list size + nLines) max:(lineNr + nLines - 1))
     ].
 
     "I have changed 'replaceFrom:to:with:startingAt:' to correctly handle
@@ -4708,9 +4708,9 @@
 "
     index := list size.
     [index > lineNr] whileTrue: [
-        pIndex := index - 1.
-        list at:index put:(list at:pIndex).
-        index := pIndex
+	pIndex := index - 1.
+	list at:index put:(list at:pIndex).
+	index := pIndex
     ].
 "
     list replaceFrom:(lineNr + nLines) to:(list size) with:list startingAt:lineNr.
@@ -4737,57 +4737,57 @@
     line       := list at:lineNr.
 
     line notNil ifTrue:[
-        lineSize := line size.
-        line isString ifFalse:[
-            stringType := line species
-        ] ifTrue:[
-            lineCharWidth := line bitsPerCharacter.
-            stringCharWidth := aString bitsPerCharacter.
-            lineCharWidth > stringCharWidth ifTrue:[
-                stringType := line string species
-            ] ifFalse:[
-                stringCharWidth > lineCharWidth ifTrue:[
-                    stringType := aString string species
-                ]
-            ].
-            line isText ifTrue:[ isText := true ]
-        ].
+	lineSize := line size.
+	line isString ifFalse:[
+	    stringType := line species
+	] ifTrue:[
+	    lineCharWidth := line bitsPerCharacter.
+	    stringCharWidth := aString bitsPerCharacter.
+	    lineCharWidth > stringCharWidth ifTrue:[
+		stringType := line string species
+	    ] ifFalse:[
+		stringCharWidth > lineCharWidth ifTrue:[
+		    stringType := aString string species
+		]
+	    ].
+	    line isText ifTrue:[ isText := true ]
+	].
     ] ifFalse:[
-        lineSize := 0
+	lineSize := 0
     ].
 
     ((colNr == 1) and:[lineSize == 0]) ifTrue: [
-        newLine := aString
+	newLine := aString
     ] ifFalse:[
-        (lineSize == 0 or:[colNr > lineSize]) ifTrue: [
-            sz := colNr + strLen - 1
-        ] ifFalse:[
-            sz := lineSize + strLen
-        ].
-
-        newLine := stringType new:sz.
-        isText ifTrue:[
-            newLine := Text string:newLine
-        ].
-
-        (lineSize ~~ 0) ifTrue: [
-            (colNr > lineSize) ifTrue: [
-                newLine replaceFrom:1 to:lineSize with:line startingAt:1
-            ] ifFalse: [
-                newLine replaceFrom:1 to:(colNr - 1) with:line startingAt:1.
-                newLine replaceFrom:(colNr + strLen) to:(lineSize + strLen) with:line startingAt:colNr
-            ]
-        ].
-        newLine replaceFrom:(colNr max:1) to:(colNr + strLen - 1) with:aString startingAt:1
+	(lineSize == 0 or:[colNr > lineSize]) ifTrue: [
+	    sz := colNr + strLen - 1
+	] ifFalse:[
+	    sz := lineSize + strLen
+	].
+
+	newLine := stringType new:sz.
+	isText ifTrue:[
+	    newLine := Text string:newLine
+	].
+
+	(lineSize ~~ 0) ifTrue: [
+	    (colNr > lineSize) ifTrue: [
+		newLine replaceFrom:1 to:lineSize with:line startingAt:1
+	    ] ifFalse: [
+		newLine replaceFrom:1 to:(colNr - 1) with:line startingAt:1.
+		newLine replaceFrom:(colNr + strLen) to:(lineSize + strLen) with:line startingAt:colNr
+	    ]
+	].
+	newLine replaceFrom:(colNr max:1) to:(colNr + strLen - 1) with:aString startingAt:1
     ].
 
     (aString includes:(Character tab)) ifTrue:[
-        newLine := self withTabs:(ListView tab8Positions) expand:newLine
+	newLine := self withTabs:(ListView tab8Positions) expand:newLine
     ].
 
     self basicListAt:lineNr put:(newLine ifNil:[newLine] ifNotNil:[newLine asSingleByteStringIfPossible]).
     widthOfWidestLine notNil ifTrue:[
-        widthOfWidestLine := widthOfWidestLine max:(self widthOfLineString:newLine).
+	widthOfWidestLine := widthOfWidestLine max:(self widthOfLineString:newLine).
     ].
     self textChanged.
 
@@ -4802,27 +4802,27 @@
     hasKeyboardFocus := true.   "/ cg: why is this needed?
     dragIsActive := false.
 
-    completionSupport notNil ifTrue:[ 
-        "/ also give that guy a chance to close its popup view
-        completionSupport buttonPress:button x:x y:y
+    completionSupport notNil ifTrue:[
+	"/ also give that guy a chance to close its popup view
+	completionSupport buttonPress:button x:x y:y
     ].
 
     cursorShown ifTrue: [
-        self drawCursor
-    ].
-
-    "On X11, be nice and paste PRIMARY when middle click. 
+	self drawCursor
+    ].
+
+    "On X11, be nice and paste PRIMARY when middle click.
      Note, that middle button on X11 is translated to button
      128 in Smalltalk/X - see XWorkstation class>>initializeConstants"
     (button == #paste and:[device platformName == #X11]) ifTrue:[
-        self undoableDo:[
-            self paste: (self getClipboardText:#selection).
-        ].
-        ^self.
+	self undoableDo:[
+	    self paste: (self getClipboardText:#selection).
+	].
+	^self.
     ].
 
     (button == 1) ifTrue:[
-        self hideCursor
+	self hideCursor
     ].
 "/ some very old code from times, when a right-click was a paste in X11
 "/
@@ -4842,60 +4842,60 @@
     |x1 x2 x2_3 newCursorCol|
 
     (button == 1) ifTrue:[
-        typeOfSelection := nil.
-
-        dragIsActive ifTrue:[
-            self unselect
-        ].
-        selectionStartLine isNil ifTrue:[
-            clickCol notNil ifTrue:[
-                self cursorMovementAllowed ifTrue:[
-                    newCursorCol := clickCol.
-
-                    cursorType ~~ #block ifTrue:[
-                        clickPos notNil ifTrue:[
-                            "/ we do something special, if the text-cursor's type is not a block-cursor
-                            "/ (i.e. if its an ibeam).
-                            "/ adjust clickCol if the user clicked in the right third of a character.
-                            x1 := self xOfCol:clickCol inVisibleLine:clickLine.  
-                            x2 := self xOfCol:clickCol+1 inVisibleLine:clickLine.
-                            x2_3 := x1 + ((x2-x1) * (2/3)).
-                            (clickPos x >= x2_3) ifTrue:[ newCursorCol := clickCol+1 ].
-                        ].
-                    ].
-                    "/ the following fixes the ugly select behavior when double clicking on
-                    "/ a partially visible last line (where the first click used to
-                    "/ scroll the text so that the second click was handled on another
-                    "/ line. An alternative (possibly better) solution would be to
-                    "/ remember the last click posision and adjust in the double click
-                    "/ event handling (i.e. subtract the number of scrolled lines in between)
-                    "/ Time will show, if this hack works.
-                    clickLine >= (self lastLineShown -1 ) ifTrue:[
-                        self cursorLine:clickLine col:newCursorCol makeVisible:false.
-                        Processor 
-                            addTimedBlock:[self sensor pushUserEvent:#makeCursorVisible for:self]
-                            after:0.3 seconds.
-                    ] ifFalse:[
-                        self cursorLine:clickLine col:newCursorCol.
-                    ].
-                ].
-                true "self hadSelectionBeforeClick not" ifTrue:[
-                    list notEmptyOrNil ifTrue:[
-                        UserPreferences current selectAllWhenClickingBeyondEnd ifTrue:[
-                            (clickLine >= list size) ifTrue:[
-                                (clickLine > (self list size + 2) 
-                                or:[ clickCol > (list last size + 5) ]) ifTrue:[
-                                    self selectAll
-                                ].
-                            ].
-                        ]
-                    ]
-                ]
-            ]
-        ] ifFalse:[
-            lastStringFromReplaceForNextSearch := nil.  "new selection invalidates remembered string"
-        ].
-        self showCursor
+	typeOfSelection := nil.
+
+	dragIsActive ifTrue:[
+	    self unselect
+	].
+	selectionStartLine isNil ifTrue:[
+	    clickCol notNil ifTrue:[
+		self cursorMovementAllowed ifTrue:[
+		    newCursorCol := clickCol.
+
+		    cursorType ~~ #block ifTrue:[
+			clickPos notNil ifTrue:[
+			    "/ we do something special, if the text-cursor's type is not a block-cursor
+			    "/ (i.e. if its an ibeam).
+			    "/ adjust clickCol if the user clicked in the right third of a character.
+			    x1 := self xOfCol:clickCol inVisibleLine:clickLine.
+			    x2 := self xOfCol:clickCol+1 inVisibleLine:clickLine.
+			    x2_3 := x1 + ((x2-x1) * (2/3)).
+			    (clickPos x >= x2_3) ifTrue:[ newCursorCol := clickCol+1 ].
+			].
+		    ].
+		    "/ the following fixes the ugly select behavior when double clicking on
+		    "/ a partially visible last line (where the first click used to
+		    "/ scroll the text so that the second click was handled on another
+		    "/ line. An alternative (possibly better) solution would be to
+		    "/ remember the last click posision and adjust in the double click
+		    "/ event handling (i.e. subtract the number of scrolled lines in between)
+		    "/ Time will show, if this hack works.
+		    clickLine >= (self lastLineShown -1 ) ifTrue:[
+			self cursorLine:clickLine col:newCursorCol makeVisible:false.
+			Processor
+			    addTimedBlock:[self sensor pushUserEvent:#makeCursorVisible for:self]
+			    after:0.3 seconds.
+		    ] ifFalse:[
+			self cursorLine:clickLine col:newCursorCol.
+		    ].
+		].
+		true "self hadSelectionBeforeClick not" ifTrue:[
+		    list notEmptyOrNil ifTrue:[
+			UserPreferences current selectAllWhenClickingBeyondEnd ifTrue:[
+			    (clickLine >= list size) ifTrue:[
+				(clickLine > (self list size + 2)
+				or:[ clickCol > (list last size + 5) ]) ifTrue:[
+				    self selectAll
+				].
+			    ].
+			]
+		    ]
+		]
+	    ]
+	] ifFalse:[
+	    lastStringFromReplaceForNextSearch := nil.  "new selection invalidates remembered string"
+	].
+	self showCursor
     ].
     super buttonRelease:button x:x y:y
 
@@ -4910,149 +4910,149 @@
     self changeTypeOfSelectionTo:nil.
 
     (key == #CursorRight) ifTrue:[
-        (shifted and:[selectionStartLine isNil]) ifTrue:[
-            selectionStartLine := selectionEndLine := clickStartLine := cursorLine.
-            selectionStartCol := selectionEndCol := clickStartCol := cursorCol.
-            expandingTop := false.
-            self validateNewSelection.
-            self setPrimarySelection.
-            self selectionChanged.
-            self redrawLine:selectionStartLine.
-            ^ self.
-        ].
-
-        selectionStartLine notNil ifTrue:[
-            self cursorMovementAllowed ifTrue:[
-                "/
-                "/ treat the whole selection as cursor
-                "/
-                self setCursorLine:(selectionEndLine ? selectionStartLine).
-                selectionEndCol == 0 ifTrue:[
-                    selectionEndCol := 1.
-                ].
-                self setCursorCol:selectionEndCol.
-                shifted ifTrue:[
-                    self expandSelectionRight.
-                    ^ self
-                ].
-                self unselect; makeCursorVisible.
-                cursorCol == 1 ifTrue:[^ self].
-            ].
-        ].
-        self cursorRight.
-        ^ self
+	(shifted and:[selectionStartLine isNil]) ifTrue:[
+	    selectionStartLine := selectionEndLine := clickStartLine := cursorLine.
+	    selectionStartCol := selectionEndCol := clickStartCol := cursorCol.
+	    expandingTop := false.
+	    self validateNewSelection.
+	    self setPrimarySelection.
+	    self selectionChanged.
+	    self redrawLine:selectionStartLine.
+	    ^ self.
+	].
+
+	selectionStartLine notNil ifTrue:[
+	    self cursorMovementAllowed ifTrue:[
+		"/
+		"/ treat the whole selection as cursor
+		"/
+		self setCursorLine:(selectionEndLine ? selectionStartLine).
+		selectionEndCol == 0 ifTrue:[
+		    selectionEndCol := 1.
+		].
+		self setCursorCol:selectionEndCol.
+		shifted ifTrue:[
+		    self expandSelectionRight.
+		    ^ self
+		].
+		self unselect; makeCursorVisible.
+		cursorCol == 1 ifTrue:[^ self].
+	    ].
+	].
+	self cursorRight.
+	^ self
     ].
     (key == #CursorDown) ifTrue:[
-        (shifted and:[selectionStartLine isNil]) ifTrue:[
-            selectionStartLine := clickStartLine := cursorLine. selectionEndLine := cursorLine + 1.
-            selectionStartCol := clickStartCol := selectionEndCol := cursorCol.
-            selectionEndCol == 1 ifTrue:[
-                selectionEndCol := 0.
-            ].
-            self validateNewSelection.
-            self selectionChanged.
-            self redrawLine:selectionStartLine.
-            expandingTop := false.
-            self redrawLine:selectionEndLine.
-            ^ self
-        ].
-
-        selectionStartLine notNil ifTrue:[
-            self cursorMovementAllowed ifTrue:[
-                "/
-                "/ treat the whole selection as cursor
-                "/
-                self setCursorLine:(selectionEndLine ? selectionStartLine).
-                self setCursorCol:selectionStartCol.
-                (cursorCol == 0 or:[selectionEndCol == 0]) ifTrue:[
-                    self setCursorCol:1.
-                    self setCursorLine:(cursorLine - 1).
-                ].
-                self makeCursorVisible.
-
-                shifted ifTrue:[
-                    clickLine := cursorLine.
-                    clickCol := cursorCol.
-                    self expandSelectionDown.
-                    ^ self
-                ].
-                self unselect.
-            ].
-        ].
-
-        n := 1 + (self sensor compressKeyPressEventsWithKey:#CursorDown).
-        self cursorDown:n.
-        "/
-        "/ flush keyboard to avoid runaway cursor
-        "/
-        self sensor flushKeyboardFor:self.
-        ^ self
+	(shifted and:[selectionStartLine isNil]) ifTrue:[
+	    selectionStartLine := clickStartLine := cursorLine. selectionEndLine := cursorLine + 1.
+	    selectionStartCol := clickStartCol := selectionEndCol := cursorCol.
+	    selectionEndCol == 1 ifTrue:[
+		selectionEndCol := 0.
+	    ].
+	    self validateNewSelection.
+	    self selectionChanged.
+	    self redrawLine:selectionStartLine.
+	    expandingTop := false.
+	    self redrawLine:selectionEndLine.
+	    ^ self
+	].
+
+	selectionStartLine notNil ifTrue:[
+	    self cursorMovementAllowed ifTrue:[
+		"/
+		"/ treat the whole selection as cursor
+		"/
+		self setCursorLine:(selectionEndLine ? selectionStartLine).
+		self setCursorCol:selectionStartCol.
+		(cursorCol == 0 or:[selectionEndCol == 0]) ifTrue:[
+		    self setCursorCol:1.
+		    self setCursorLine:(cursorLine - 1).
+		].
+		self makeCursorVisible.
+
+		shifted ifTrue:[
+		    clickLine := cursorLine.
+		    clickCol := cursorCol.
+		    self expandSelectionDown.
+		    ^ self
+		].
+		self unselect.
+	    ].
+	].
+
+	n := 1 + (self sensor compressKeyPressEventsWithKey:#CursorDown).
+	self cursorDown:n.
+	"/
+	"/ flush keyboard to avoid runaway cursor
+	"/
+	self sensor flushKeyboardFor:self.
+	^ self
     ].
     (key == #CursorLeft or:[key == #CursorUp]) ifTrue:[
-        (shifted and:[selectionStartLine isNil]) ifTrue:[
-            expandingTop := true.
-            key == #CursorLeft ifTrue:[
-                cursorCol > 1 ifTrue:[
-                    selectionStartLine := selectionEndLine := clickStartLine := cursorLine.
-                    selectionEndCol := clickStartCol := cursorCol-1.
-                    selectionStartCol := cursorCol-1.
-                    self validateNewSelection.
-                    self selectionChanged.
-                    self redrawLine:selectionStartLine.
-                    ^ self
-                ]
-            ] ifFalse:[
-                cursorLine > 1 ifTrue:[
-                    selectionEndLine := clickStartLine := cursorLine.
-                    selectionEndCol := selectionStartCol := clickStartCol := cursorCol.
-                    selectionStartLine := cursorLine - 1.
-                    selectionEndCol == 1 ifTrue:[
-                        selectionEndCol := 0.
-                    ].
-                    self validateNewSelection.
-                    self selectionChanged.
-                    self redrawFromLine:selectionStartLine to:cursorLine.
-                    ^ self
-                ]
-            ]
-        ].
-
-        selectionStartLine notNil ifTrue:[
-            self cursorMovementAllowed ifTrue:[
-                "/
-                "/ treat the whole selection as cursor
-                "/
-                self setCursorLine:selectionStartLine.
-                self setCursorCol:selectionStartCol.
-                (key == #CursorLeft) ifTrue:[
-                    self setCursorCol:(cursorCol+1).  "/ compensate for followup crsr-left
-                ].
-                self makeCursorVisible.
-
-                shifted ifTrue:[
-                    (key == #CursorUp) ifTrue:[
-                        clickLine := cursorLine.
-                        self expandSelectionUp.
-                    ] ifFalse:[
-                        self expandSelectionLeft.
-                    ].
-                    ^ self
-                ].
-                self unselect.
-            ].
-        ].
-        (key == #CursorLeft) ifTrue:[
-            self cursorLeft. ^self
-        ].
-        (key == #CursorUp)        ifTrue:[
-            n := 1 + (self sensor compressKeyPressEventsWithKey:#CursorUp).
-            self cursorUp:n.
-            "/
-            "/ flush keyboard to avoid runaway cursor
-            "/
-            self sensor flushKeyboardFor:self.
-            ^ self
-        ].
+	(shifted and:[selectionStartLine isNil]) ifTrue:[
+	    expandingTop := true.
+	    key == #CursorLeft ifTrue:[
+		cursorCol > 1 ifTrue:[
+		    selectionStartLine := selectionEndLine := clickStartLine := cursorLine.
+		    selectionEndCol := clickStartCol := cursorCol-1.
+		    selectionStartCol := cursorCol-1.
+		    self validateNewSelection.
+		    self selectionChanged.
+		    self redrawLine:selectionStartLine.
+		    ^ self
+		]
+	    ] ifFalse:[
+		cursorLine > 1 ifTrue:[
+		    selectionEndLine := clickStartLine := cursorLine.
+		    selectionEndCol := selectionStartCol := clickStartCol := cursorCol.
+		    selectionStartLine := cursorLine - 1.
+		    selectionEndCol == 1 ifTrue:[
+			selectionEndCol := 0.
+		    ].
+		    self validateNewSelection.
+		    self selectionChanged.
+		    self redrawFromLine:selectionStartLine to:cursorLine.
+		    ^ self
+		]
+	    ]
+	].
+
+	selectionStartLine notNil ifTrue:[
+	    self cursorMovementAllowed ifTrue:[
+		"/
+		"/ treat the whole selection as cursor
+		"/
+		self setCursorLine:selectionStartLine.
+		self setCursorCol:selectionStartCol.
+		(key == #CursorLeft) ifTrue:[
+		    self setCursorCol:(cursorCol+1).  "/ compensate for followup crsr-left
+		].
+		self makeCursorVisible.
+
+		shifted ifTrue:[
+		    (key == #CursorUp) ifTrue:[
+			clickLine := cursorLine.
+			self expandSelectionUp.
+		    ] ifFalse:[
+			self expandSelectionLeft.
+		    ].
+		    ^ self
+		].
+		self unselect.
+	    ].
+	].
+	(key == #CursorLeft) ifTrue:[
+	    self cursorLeft. ^self
+	].
+	(key == #CursorUp)        ifTrue:[
+	    n := 1 + (self sensor compressKeyPressEventsWithKey:#CursorUp).
+	    self cursorUp:n.
+	    "/
+	    "/ flush keyboard to avoid runaway cursor
+	    "/
+	    self sensor flushKeyboardFor:self.
+	    ^ self
+	].
     ].
 
     "Modified: / 17-04-2012 / 21:01:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
@@ -5062,22 +5062,22 @@
     "handle keyboard input"
 
     <resource: #keyboard (#Paste #Insert #PasteFromHistory #Cut #Again #AgainForAll
-                          #Replace #Undo #Redo #Accept
-                          #Delete #BasicDelete #BackSpace #BasicBackspace
-                          #DeleteSpaces #Join
-                          #SearchMatchingParent #SelectMatchingParents
-                          #SelectWord #ExpandSelectionByWord
-                          #SelectToEnd #SelectFromBeginning
-                          #SelectLine #ExpandSelectionByLine
-                          #BeginOfLine #EndOfLine #NextWord #PreviousWord
-                          #CursorRight #CursorDown #CursorLeft #CursorUp
-                          #Return #Tab #BackTab #NonInsertingTab #Escape
-                          #GotoLine #BeginOfText #EndOfText
-                          #InsertLine #DeleteLine
-                          #SelectLineFromBeginning
-                          #LearnKeyboardMacro #ExecuteKeyboardMacro #ToggleInsertMode
-                          #OpenSpecialCharacterWindow #InsertUUID
-                          #'F*' #'f*')>
+			  #Replace #Undo #Redo #Accept
+			  #Delete #BasicDelete #BackSpace #BasicBackspace
+			  #DeleteSpaces #Join
+			  #SearchMatchingParent #SelectMatchingParents
+			  #SelectWord #ExpandSelectionByWord
+			  #SelectToEnd #SelectFromBeginning
+			  #SelectLine #ExpandSelectionByLine
+			  #BeginOfLine #EndOfLine #NextWord #PreviousWord
+			  #CursorRight #CursorDown #CursorLeft #CursorUp
+			  #Return #Tab #BackTab #NonInsertingTab #Escape
+			  #GotoLine #BeginOfText #EndOfText
+			  #InsertLine #DeleteLine
+			  #SelectLineFromBeginning
+			  #LearnKeyboardMacro #ExecuteKeyboardMacro #ToggleInsertMode
+			  #OpenSpecialCharacterWindow #InsertUUID
+			  #'F*' #'f*')>
 
     |fKeyMacros shiftPressed ctrlPressed i event macroName
      immediateCompletion currentUserPrefs rawKey|
@@ -5086,154 +5086,154 @@
 
     "/ experimental
     immediateCompletion := currentUserPrefs immediateCodeCompletion.
-    (immediateCompletion 
+    (immediateCompletion
     or:[currentUserPrefs codeCompletionOnControlKey
     or:[currentUserPrefs codeCompletionOnTabKey]]) ifTrue:[
-        completionSupport isNil ifTrue:[
-            self initializeCompletionSupport.
-        ].
-    ].
-    
+	completionSupport isNil ifTrue:[
+	    self initializeCompletionSupport.
+	].
+    ].
+
     "/ JV: why setting it to nil here?
 "/    ifFalse:[
 "/        completionService := nil
 "/    ].
     completionSupport notNil ifTrue:[
-        completionSupport stopCompletionProcess.
-        (completionSupport handleKeyPress:key x:x y:y) ifTrue:["eaten" ^ self].
+	completionSupport stopCompletionProcess.
+	(completionSupport handleKeyPress:key x:x y:y) ifTrue:["eaten" ^ self].
     ].
 
     key isSymbol ifTrue:[
-        (device modifierKeys includes:key) ifFalse:[
-            lastReplacementInfo stillCollectingInput:false.
-        ]
+	(device modifierKeys includes:key) ifFalse:[
+	    lastReplacementInfo stillCollectingInput:false.
+	]
     ].
     (key == #LearnKeyboardMacro) ifTrue:[
-        lastReplacementInfo stillCollectingInput:false.
-        self toggleLearnMode.
-        ^ self
+	lastReplacementInfo stillCollectingInput:false.
+	self toggleLearnMode.
+	^ self
     ].
     (key == #ExecuteKeyboardMacro) ifTrue:[
-        lastReplacementInfo stillCollectingInput:false.
-        self executeLearnedKeyboardMacro.
-        ^ self.
+	lastReplacementInfo stillCollectingInput:false.
+	self executeLearnedKeyboardMacro.
+	^ self.
     ].
     (key == #Undo) ifTrue:[self undo. ^self].
     (key == #Redo) ifTrue:[self redo. ^self].
 
     self learnMode ifTrue:[
-        event := WindowGroup lastEventQuerySignal query.
-        learnedMacro add:event.
+	event := WindowGroup lastEventQuerySignal query.
+	learnedMacro add:event.
     ].
 
     (self executekeyboardMacroNamed:key) ifTrue:[
-        "the macro named key exists"
-        ^ self
+	"the macro named key exists"
+	^ self
     ].
 
     key isSymbol ifFalse:[
-        "the usual case: key is a character, but maybe a string also (in X11)"
-        self handleNonCommandKey:key.
-        ^ self
+	"the usual case: key is a character, but maybe a string also (in X11)"
+	self handleNonCommandKey:key.
+	^ self
     ].
 
     event isNil ifTrue:[
-        event := WindowGroup lastEventQuerySignal query.
+	event := WindowGroup lastEventQuerySignal query.
     ].
     shiftPressed := event hasShift.
     ctrlPressed := event hasCtrl and:[(event rawKey asString startsWith:'Ctrl') not].
     rawKey := event rawKey.
 
     key == #InsertUUID ifTrue:[
-        self insertUUID.
-        ^ self.
+	self insertUUID.
+	^ self.
     ].
 
     (key == #DeleteWordBeforeCursor) ifTrue:[
-        self deleteWordBeforeCursor.
-        ^ self.
+	self deleteWordBeforeCursor.
+	^ self.
     ].
 
     (rawKey == #BackSpace or:[key == #BasicBackspace]) ifTrue:[
-        selectionStartLine notNil ifTrue:[
-            ((key == #BasicBackspace)
-            or:[ currentUserPrefs deleteSetsClipboardText not ])
-            ifTrue:[
-                self deleteSelection.
-            ] ifFalse: [
-                self copyAndDeleteSelection.
-            ].
-        ] ifFalse:[
-            self makeCursorVisible.
+	selectionStartLine notNil ifTrue:[
+	    ((key == #BasicBackspace)
+	    or:[ currentUserPrefs deleteSetsClipboardText not ])
+	    ifTrue:[
+		self deleteSelection.
+	    ] ifFalse: [
+		self copyAndDeleteSelection.
+	    ].
+	] ifFalse:[
+	    self makeCursorVisible.
 "/          (shiftPressed and:[ ctrlPressed ]) ifTrue:[
 "/            self deleteWordBeforeCursor.
 "/          ] ifFalse:[
-            self deleteCharBeforeCursor.
+	    self deleteCharBeforeCursor.
 "/          ].
-        ].
-        true "immediateCompletion" ifTrue:[ 
-            completionSupport notNil ifTrue:[ 
-                completionSupport postKeyPress:key
-            ].
-        ].
-        ^ self
+	].
+	true "immediateCompletion" ifTrue:[
+	    completionSupport notNil ifTrue:[
+		completionSupport postKeyPress:key
+	    ].
+	].
+	^ self
     ].
 
     (key == #ToggleAutoIndent) ifTrue:[
-        self autoIndent:(autoIndent not).
-        ^ self.
+	self autoIndent:(autoIndent not).
+	^ self.
     ].
 
     key == #ToggleInsertMode ifTrue:[
-        self insertMode:(editMode value == EditMode insertMode) not.
-        ^ self.
+	self insertMode:(editMode value == EditMode insertMode) not.
+	^ self.
     ].
 
     key == #OpenSpecialCharacterWindow ifTrue:[
-        CharacterSetView notNil ifTrue:[
-            self specialCharacters.
-            ^ self.
-        ]        
+	CharacterSetView notNil ifTrue:[
+	    self specialCharacters.
+	    ^ self.
+	]
     ].
 
     replacing := false.
 
     "
      Fn      pastes a key-sequence (but only if not overlayed with
-             another function in the keyboard map)
+	     another function in the keyboard map)
 
      see TextView>>:x:y
     "
     (key at:1) asLowercase == $f ifTrue:[
-        (('[fF][0-9]' match:key)
-        or:['[fF][0-9][0-9]' match:key]) ifTrue:[
-            shiftPressed ifFalse:[
-                fKeyMacros := currentUserPrefs functionKeySequences.
-                fKeyMacros notNil ifTrue:[
-                    (fKeyMacros includesKey:key) ifTrue:[
-                        self pasteOrReplace:(fKeyMacros at:key) asStringCollection.
-                        ^ self
-                    ]
-                ]
-            ]
-        ].
+	(('[fF][0-9]' match:key)
+	or:['[fF][0-9][0-9]' match:key]) ifTrue:[
+	    shiftPressed ifFalse:[
+		fKeyMacros := currentUserPrefs functionKeySequences.
+		fKeyMacros notNil ifTrue:[
+		    (fKeyMacros includesKey:key) ifTrue:[
+			self pasteOrReplace:(fKeyMacros at:key) asStringCollection.
+			^ self
+		    ]
+		]
+	    ]
+	].
     ].
 
     (key == #'Ctrl8' or:[key == #'Ctrl9']) ifTrue:[
-        self parenthizeSelectionWith:$( and:$).
-        ^ self.
+	self parenthizeSelectionWith:$( and:$).
+	^ self.
     ].
     (key == #'Ctrl2') ifTrue:[
-        self parenthizeSelectionWith:$" and:$".
-        ^ self.
+	self parenthizeSelectionWith:$" and:$".
+	^ self.
     ].
     (key == #'Ctrl#') ifTrue:[
-        self parenthizeSelectionWith:$' and:$'.
-        ^ self.
+	self parenthizeSelectionWith:$' and:$'.
+	^ self.
     ].
     (key == #'ConvertSelectionToLowercaseOrUppercaseOrUppercaseFirst') ifTrue:[
-        self convertSelectionToLowercaseOrUppercaseOrUppercaseFirst.
-        ^ self.
+	self convertSelectionToLowercaseOrUppercaseOrUppercaseFirst.
+	^ self.
     ].
 
     (key == #Accept)  ifTrue:[^ self accept].
@@ -5246,14 +5246,14 @@
     (key == #Join) ifTrue:[self joinLines. ^self].
     (key == #Replace) ifTrue:[self replace. ^self].
     (key == #ExpandSelectionByWord) ifTrue:[
-        self makeCursorVisible.
-        self findNextWordAfterSelectionAndAddToSelection.
-        ^ self
+	self makeCursorVisible.
+	self findNextWordAfterSelectionAndAddToSelection.
+	^ self
     ].
     (key == #SelectWord) ifTrue:[
-        self makeCursorVisible.
-        self selectWordUnderCursor.
-        ^ self
+	self makeCursorVisible.
+	self selectWordUnderCursor.
+	^ self
     ].
 
     (key == #SearchMatchingParent) ifTrue:[self searchForMatchingParenthesis. ^ self].
@@ -5271,60 +5271,60 @@
 "
 
     (key == #BeginOfLine) ifTrue:[
-        "/ cg: this is complete rubbish - you have to define a mapping from
-        "/ some shifted key to selectFromBeginOfLine
-        "/ (otherwise, no shifted key could ever be mapped to BegnOfLine)
-        "/ see code below.
-        false "shiftPressed" ifTrue: [
-            "/ "Original St/X code - now use Ctrl modifier"
-            "/ self unselect.
-            "/ self cursorHome.
-            "Jan's modification"
-            "/ self addToSelectionAfter:[ self cursorToBeginOfLine ].
-            "/ Jan's modification modified by his own request ;-))
-            self selectFromBeginOfLine.
-        ] ifFalse: [
-            self unselect.
-            ctrlPressed ifTrue:[
-                self cursorHome.
-            ] ifFalse:[
-                self cursorToBeginOfLine.
-            ]
-        ].
-        ^ self
+	"/ cg: this is complete rubbish - you have to define a mapping from
+	"/ some shifted key to selectFromBeginOfLine
+	"/ (otherwise, no shifted key could ever be mapped to BegnOfLine)
+	"/ see code below.
+	false "shiftPressed" ifTrue: [
+	    "/ "Original St/X code - now use Ctrl modifier"
+	    "/ self unselect.
+	    "/ self cursorHome.
+	    "Jan's modification"
+	    "/ self addToSelectionAfter:[ self cursorToBeginOfLine ].
+	    "/ Jan's modification modified by his own request ;-))
+	    self selectFromBeginOfLine.
+	] ifFalse: [
+	    self unselect.
+	    ctrlPressed ifTrue:[
+		self cursorHome.
+	    ] ifFalse:[
+		self cursorToBeginOfLine.
+	    ]
+	].
+	^ self
     ].
     (key == #BSelectFromeginOfLine) ifTrue:[
-        self selectFromBeginOfLine.
-        ^ self
+	self selectFromBeginOfLine.
+	^ self
     ].
 
     (key == #EndOfLine) ifTrue:[
-        "/ cg: this is complete rubbish - you have to define a mapping from
-        "/ some shifted key to selectFromBeginOfLine
-        "/ (otherwise, no shifted key could ever be mapped to BegnOfLine)
-        "/ see code below.
-        false "shiftPressed" ifTrue:[
-            "/ "Original St/X code - now use Ctrl modifier"
-            "/ self unselect.
-            "/ self cursorToBottom
-            " Jan's modification"
-            "/ self addToSelectionAfter:[ self cursorToEndOfLine ] .
-            "/ Jan's modification modified by his own request ;-))
-            self selectToEndOfLine.
-        ] ifFalse:[
-            self unselect.
-            ctrlPressed ifTrue:[
-                self cursorToBottom
-            ] ifFalse:[
-                self cursorToEndOfLine.
-            ]
-        ].
-        ^ self
+	"/ cg: this is complete rubbish - you have to define a mapping from
+	"/ some shifted key to selectFromBeginOfLine
+	"/ (otherwise, no shifted key could ever be mapped to BegnOfLine)
+	"/ see code below.
+	false "shiftPressed" ifTrue:[
+	    "/ "Original St/X code - now use Ctrl modifier"
+	    "/ self unselect.
+	    "/ self cursorToBottom
+	    " Jan's modification"
+	    "/ self addToSelectionAfter:[ self cursorToEndOfLine ] .
+	    "/ Jan's modification modified by his own request ;-))
+	    self selectToEndOfLine.
+	] ifFalse:[
+	    self unselect.
+	    ctrlPressed ifTrue:[
+		self cursorToBottom
+	    ] ifFalse:[
+		self cursorToEndOfLine.
+	    ]
+	].
+	^ self
     ].
 
     (key == #SelectToEndOfLine) ifTrue:[
-        self selectToEndOfLine.
-        ^ self
+	self selectToEndOfLine.
+	^ self
     ].
 
     (key == #NextWord) ifTrue:[self cursorToNextWord. ^self].
@@ -5336,189 +5336,189 @@
     or:[rawKey == #CursorDown
     or:[rawKey == #CursorLeft
     or:[rawKey == #CursorUp]]]) ifTrue:[
-        self cursorKeyPress:rawKey shifted:shiftPressed.
-        ^ self.
+	self cursorKeyPress:rawKey shifted:shiftPressed.
+	^ self.
     ].
 
     (key == #ShiftReturn or:[key == #NonInsertingReturn]) ifTrue:[
-        self unselect. self cursorReturn.
-        ^ self
+	self unselect. self cursorReturn.
+	^ self
     ].
 
     (key == #Return) ifTrue:[
-        shiftPressed ifTrue:[
-            self unselect. self cursorReturn.
-            ^ self
-        ].
-
-        self isReadOnly ifTrue:[
-            self unselect; makeCursorVisible.
-            self cursorReturn
-        ] ifFalse:[
-            self isInInsertMode ifFalse:[
-                self cursorReturn:true.
-                autoIndent == true ifTrue:[
-                    i := self leftIndentForLine:(cursorLine + 1).
-                    (self listAt:cursorLine) isEmptyOrNil ifTrue:[
-                        self cursorCol:(i+1 max:1)
-                    ]
-                ]
-            ] ifTrue:[
-                |left right oldIndent|
-
-                "/ old version just unselected ...
-                "/ self unselect; makeCursorVisible.
-
-                "/ new version deletes ...
-                typeOfSelection == #paste ifTrue:[
-                    self unselect; makeCursorVisible.
-                ] ifFalse:[
-                    self copyAndDeleteSelection.
-                ].
-                left := (self listAt:cursorLine to:cursorCol-1) ? ''.
-                right := (self listAt:cursorLine from:cursorCol) ? ''.
-                self insertCharAtCursor:(Character cr).
-
-                autoIndent == true ifTrue:[
-                    (right isEmpty and:[cursorCol ~~ 1]) ifTrue:[
-                        "/ nothing to do.
-                    ] ifFalse:[
-                        ((self listAt:cursorLine) isEmptyOrNil 
-                        or:[ false "cursorCol == 1" ]) ifTrue:[
-                            i := (self leftIndentForLine:cursorLine).
-                            left := left withoutSeparators.
-                            right := right withoutSeparators.
-                            (left endsWith:'[') ifTrue:[
+	shiftPressed ifTrue:[
+	    self unselect. self cursorReturn.
+	    ^ self
+	].
+
+	self isReadOnly ifTrue:[
+	    self unselect; makeCursorVisible.
+	    self cursorReturn
+	] ifFalse:[
+	    self isInInsertMode ifFalse:[
+		self cursorReturn:true.
+		autoIndent == true ifTrue:[
+		    i := self leftIndentForLine:(cursorLine + 1).
+		    (self listAt:cursorLine) isEmptyOrNil ifTrue:[
+			self cursorCol:(i+1 max:1)
+		    ]
+		]
+	    ] ifTrue:[
+		|left right oldIndent|
+
+		"/ old version just unselected ...
+		"/ self unselect; makeCursorVisible.
+
+		"/ new version deletes ...
+		typeOfSelection == #paste ifTrue:[
+		    self unselect; makeCursorVisible.
+		] ifFalse:[
+		    self copyAndDeleteSelection.
+		].
+		left := (self listAt:cursorLine to:cursorCol-1) ? ''.
+		right := (self listAt:cursorLine from:cursorCol) ? ''.
+		self insertCharAtCursor:(Character cr).
+
+		autoIndent == true ifTrue:[
+		    (right isEmpty and:[cursorCol ~~ 1]) ifTrue:[
+			"/ nothing to do.
+		    ] ifFalse:[
+			((self listAt:cursorLine) isEmptyOrNil
+			or:[ false "cursorCol == 1" ]) ifTrue:[
+			    i := (self leftIndentForLine:cursorLine).
+			    left := left withoutSeparators.
+			    right := right withoutSeparators.
+			    (left endsWith:'[') ifTrue:[
 "/                                i := i + 4.
-                            ] ifFalse:[
-                                (false "(left endsWith:']')" or:[(right startsWith:']')]) ifTrue:[
-                                    i := i - 4.
-                                ].
-                            ].
-                            oldIndent := self leftIndentOfLine:cursorLine.
-                            self indentFromLine:cursorLine toLine:cursorLine by:(i-oldIndent).
-                            self st80EditMode ifTrue:[
-                                (self listAt:cursorLine) size < i ifTrue:[
-                                    self insertStringAtCursor:(String new:((i-oldIndent) max:0)).
-                                ].
-                            ].
-                            self cursorCol:(i+1 max:1)
-                        ].
-                    ]
-                ].
-            ].
-        ].
-        ^ self
+			    ] ifFalse:[
+				(false "(left endsWith:']')" or:[(right startsWith:']')]) ifTrue:[
+				    i := i - 4.
+				].
+			    ].
+			    oldIndent := self leftIndentOfLine:cursorLine.
+			    self indentFromLine:cursorLine toLine:cursorLine by:(i-oldIndent).
+			    self st80EditMode ifTrue:[
+				(self listAt:cursorLine) size < i ifTrue:[
+				    self insertStringAtCursor:(String new:((i-oldIndent) max:0)).
+				].
+			    ].
+			    self cursorCol:(i+1 max:1)
+			].
+		    ]
+		].
+	    ].
+	].
+	^ self
     ].
 
     (key == #NonInsertingTab) ifTrue:[
-        self unselect. self cursorTab.
-        ^ self
+	self unselect. self cursorTab.
+	^ self
     ].
     ((key == #BackTab) or:[(key == #Tab)]) ifTrue:[
-        self tabMeansNextField ifTrue:[^ super keyPress:key x:x y:y].
-
-        self hasSelection ifTrue:[
-            selectStyle == #line ifTrue:[
-                ((key == #Tab) and:[shiftPressed not]) ifTrue:[
-                    macroName := #IndentBy4.
-                ] ifFalse:[
-                    macroName := #UndentBy4.
-                ].
-                macroName notNil ifTrue:[
-                    self executekeyboardMacroNamed:macroName.
-                ].
-            ]
-        ].
-
-        self unselect.
-        (key == #Tab) ifTrue:[
-            (shiftPressed or:[self isInInsertMode not]) ifTrue:[
-                self cursorTab.
-                ^ self
-            ].
-            self insertTabAtCursor.
-            ^ self
-        ].
-        self cursorBacktab.
-        ^ self
+	self tabMeansNextField ifTrue:[^ super keyPress:key x:x y:y].
+
+	self hasSelection ifTrue:[
+	    selectStyle == #line ifTrue:[
+		((key == #Tab) and:[shiftPressed not]) ifTrue:[
+		    macroName := #IndentBy4.
+		] ifFalse:[
+		    macroName := #UndentBy4.
+		].
+		macroName notNil ifTrue:[
+		    self executekeyboardMacroNamed:macroName.
+		].
+	    ]
+	].
+
+	self unselect.
+	(key == #Tab) ifTrue:[
+	    (shiftPressed or:[self isInInsertMode not]) ifTrue:[
+		self cursorTab.
+		^ self
+	    ].
+	    self insertTabAtCursor.
+	    ^ self
+	].
+	self cursorBacktab.
+	^ self
     ].
 
     "/ key == #DeleteSpaces ifTrue:[
     (rawKey == #Delete) ifTrue:[
-        shiftPressed ifTrue:[
-            [(cursorCol <= (self listAt:cursorLine) size)
-             and:[self characterUnderCursor isSeparator]] whileTrue:[
-             self makeCursorVisible.
-                self deleteCharAtCursor.
-            ].
-            ^ self
-        ]
+	shiftPressed ifTrue:[
+	    [(cursorCol <= (self listAt:cursorLine) size)
+	     and:[self characterUnderCursor isSeparator]] whileTrue:[
+	     self makeCursorVisible.
+		self deleteCharAtCursor.
+	    ].
+	    ^ self
+	]
     ].
 
     (rawKey == #Delete
      or:[key == #BasicDelete]) ifTrue:[
-        selectionStartLine notNil ifTrue:[  
+	selectionStartLine notNil ifTrue:[
 "/          Again function is not supporting Delete action (on purpose, to avoid replacing the next search string)
 "/          To remove text repetetively, use Cut instead.
 "/            self setLastStringToReplace: self selection asStringWithoutFinalCR.
 "/            lastReplacementInfo lastReplacement: nil.
-            ((key == #BasicDelete)
-            or:[currentUserPrefs deleteSetsClipboardText not]) ifTrue:[
-                self deleteSelection.
-            ] ifFalse:[
-                self copyAndDeleteSelection.
-            ].
-            ^ self
-        ].
-        self makeCursorVisible.
-        self deleteCharAtCursor.
-        ^ self
+	    ((key == #BasicDelete)
+	    or:[currentUserPrefs deleteSetsClipboardText not]) ifTrue:[
+		self deleteSelection.
+	    ] ifFalse:[
+		self copyAndDeleteSelection.
+	    ].
+	    ^ self
+	].
+	self makeCursorVisible.
+	self deleteCharAtCursor.
+	^ self
     ].
 
     (key == #BeginOfText) ifTrue:[     "i.e. HOME"
-        self unselect.
-        cursorVisibleLine == 1 ifTrue:[
-            self cursorHome.
-        ] ifFalse:[
-            self cursorToFirstVisibleLine
-        ].
-        ^ self
+	self unselect.
+	cursorVisibleLine == 1 ifTrue:[
+	    self cursorHome.
+	] ifFalse:[
+	    self cursorToFirstVisibleLine
+	].
+	^ self
     ].
     (key == #EndOfText) ifTrue:[       "i.e. END"
-        self unselect.
-        cursorVisibleLine == nFullLinesShown ifTrue:[
-            self cursorToBottom.
-        ] ifFalse:[
-            self cursorToLastVisibleLine
-        ].
-        ^ self
+	self unselect.
+	cursorVisibleLine == nFullLinesShown ifTrue:[
+	    self cursorToBottom.
+	] ifFalse:[
+	    self cursorToLastVisibleLine
+	].
+	^ self
     ].
     ((key == #Escape)
     or:[key == #SelectLineFromBeginning]) ifTrue:[
-        self makeCursorVisible.
-        self unselect. self selectCursorLineFromBeginning.
-        ^ self
+	self makeCursorVisible.
+	self unselect. self selectCursorLineFromBeginning.
+	^ self
     ].
     (key == #SelectLine) ifTrue:[
-        self makeCursorVisible.
-        self unselect. self selectCursorLine.
-        ^ self
+	self makeCursorVisible.
+	self unselect. self selectCursorLine.
+	^ self
     ].
     (key == #ExpandSelectionByLine) ifTrue:[
-        "/ self makeCursorVisible.
-        self selectExpandCursorLine.
-        ^ self
+	"/ self makeCursorVisible.
+	self selectExpandCursorLine.
+	^ self
     ].
     (key == #DeleteLine) ifTrue:[
-        self makeCursorVisible.
-        self unselect. self deleteCursorLine.
-        ^ self
+	self makeCursorVisible.
+	self unselect. self deleteCursorLine.
+	^ self
     ].
     (key == #InsertLine) ifTrue:[
-        self makeCursorVisible.
-        self unselect. self insertLine:nil before:cursorLine.
-        ^ self
+	self makeCursorVisible.
+	self unselect. self insertLine:nil before:cursorLine.
+	^ self
     ].
 
     super keyPress:key x:x y:y
@@ -5530,19 +5530,19 @@
 
 executeKeyboardMacro:cmdMacro
     Error handle:[:ex |
-        self warn:'Error in keyboard macro: ' , ex description.
-        ex return.
+	self warn:'Error in keyboard macro: ' , ex description.
+	ex return.
     ] do:[
-        AbortOperationRequest handle:[:ex |
-            self warn:'Keyboard macro aborted'.
-            ex return.
-        ] do:[
-            Parser
-                evaluate:cmdMacro asString
-                receiver:self
-                notifying:nil
-                compile:false.
-        ].
+	AbortOperationRequest handle:[:ex |
+	    self warn:'Keyboard macro aborted'.
+	    ex return.
+	] do:[
+	    Parser
+		evaluate:cmdMacro asString
+		receiver:self
+		notifying:nil
+		compile:false.
+	].
     ].
 !
 
@@ -5550,15 +5550,15 @@
     |selStartLineBefore selStartColBefore selEndLineBefore selEndColBefore key|
 
     self isReadOnly ifTrue:[
-        self flashReadOnly.
-        ^ self.
+	self flashReadOnly.
+	^ self.
     ].
 
     key := keyArg.
 
     typeOfSelection == #paste ifTrue:[
-        "pasted selection will NOT be replaced by keystroke"
-        self unselect
+	"pasted selection will NOT be replaced by keystroke"
+	self unselect
     ].
 
     selStartLineBefore := selectionStartLine.
@@ -5567,11 +5567,11 @@
     selEndColBefore := self selectionEndCol.
 
     (gc characterEncoding ? #'iso10646-1') ~~ #'iso10646-1' ifTrue:[
-        key isCharacter ifTrue:[
-            key := CharacterEncoder encode:key from:#'iso10646-1' into:gc characterEncoding.
-        ] ifFalse:[
-            key := CharacterEncoder encodeString:key from:#'iso10646-1' into:gc characterEncoding.
-        ].
+	key isCharacter ifTrue:[
+	    key := CharacterEncoder encode:key from:#'iso10646-1' into:gc characterEncoding.
+	] ifFalse:[
+	    key := CharacterEncoder encodeString:key from:#'iso10646-1' into:gc characterEncoding.
+	].
     ].
 
     "replace selection by what is typed in -
@@ -5579,64 +5579,64 @@
      if there was no selection, the key's character is inserted"
 
     editMode value isInsertAndSelectMode ifTrue:[
-        selectionStartLine := selectionStartCol := selectionEndLine := selectionEndCol := nil.
+	selectionStartLine := selectionStartCol := selectionEndLine := selectionEndCol := nil.
     ].
 
     (selectStyle == #wordLeft) ifTrue:[
-        self replaceSelectionBy:(' ' , key asString)
+	self replaceSelectionBy:(' ' , key asString)
     ] ifFalse:[
-        (selectStyle == #wordRight) ifTrue:[
-            self replaceSelectionBy:(key asString , ' ').
-            self cursorLeft
-        ] ifFalse:[
-            self replaceSelectionBy:key
-        ]
+	(selectStyle == #wordRight) ifTrue:[
+	    self replaceSelectionBy:(key asString , ' ').
+	    self cursorLeft
+	] ifFalse:[
+	    self replaceSelectionBy:key
+	]
     ].
     selectStyle := nil.
 
     editMode value isInsertAndSelectMode ifTrue:[
-        selectionStartLine := selStartLineBefore.
-        selectionStartCol := selStartColBefore.
-        selectionEndLine := selEndLineBefore.
-        selectionEndCol := selEndColBefore.
+	selectionStartLine := selStartLineBefore.
+	selectionStartCol := selStartColBefore.
+	selectionEndLine := selEndLineBefore.
+	selectionEndCol := selEndColBefore.
     ].
 
     showMatchingParenthesis ifTrue:[
-        "emacs style parenthesis shower"
+	"emacs style parenthesis shower"
       (ExecutingMacroQuery query ? false) ifFalse:[
-        "claus: only do it for closing parenthesis -
-                otherwise its too anoying.
-        "
+	"claus: only do it for closing parenthesis -
+		otherwise its too anoying.
+	"
 "
-        ('()[]{}' includes:key) ifTrue:[
+	('()[]{}' includes:key) ifTrue:[
 "
-        (')]}' includes:key) ifTrue:[
-        self
-            searchForMatchingParenthesisFromLine:cursorLine col:(cursorCol - 1)
-            ifFound:[:line :col |
-                         |savLine savCol sensor|
-
-                         self withCursor:Cursor eye do:[
-                             savLine := cursorLine.
-                             savCol := cursorCol.
-                             self cursorLine:line col:col.
-                             self flush.
-
-                             "/ want to wait 200ms, but not if another keyPress
-                             "/ arrives in the meantime ...
-
-                             sensor := self sensor.
-                             5 timesRepeat:[
-                                 (sensor hasKeyPressEventFor:self) ifFalse:[
-                                     Processor activeProcess millisecondDelay:40.
-                                 ]
-                             ].
-                             self cursorLine:savLine col:savCol
-                         ]
-                    ]
-            ifNotFound:[self showNotFound]
-            onError:[self beep]
-        ].
+	(')]}' includes:key) ifTrue:[
+	self
+	    searchForMatchingParenthesisFromLine:cursorLine col:(cursorCol - 1)
+	    ifFound:[:line :col |
+			 |savLine savCol sensor|
+
+			 self withCursor:Cursor eye do:[
+			     savLine := cursorLine.
+			     savCol := cursorCol.
+			     self cursorLine:line col:col.
+			     self flush.
+
+			     "/ want to wait 200ms, but not if another keyPress
+			     "/ arrives in the meantime ...
+
+			     sensor := self sensor.
+			     5 timesRepeat:[
+				 (sensor hasKeyPressEventFor:self) ifFalse:[
+				     Processor activeProcess millisecondDelay:40.
+				 ]
+			     ].
+			     self cursorLine:savLine col:savCol
+			 ]
+		    ]
+	    ifNotFound:[self showNotFound]
+	    onError:[self beep]
+	].
       ]
     ].
 
@@ -5650,11 +5650,11 @@
 "/        ].
 "/    ].
     editMode value isInsertAndSelectMode ifTrue:[
-        selectionStartLine isNil ifTrue:[
-            self selectFromLine:cursorLine col:cursorCol-1 toLine:cursorLine col:cursorCol-1.
-        ] ifFalse:[
-            self selectFromLine:selectionStartLine col:selectionStartCol toLine:cursorLine col:cursorCol-1.
-        ].
+	selectionStartLine isNil ifTrue:[
+	    self selectFromLine:cursorLine col:cursorCol-1 toLine:cursorLine col:cursorCol-1.
+	] ifFalse:[
+	    self selectFromLine:selectionStartLine col:selectionStartCol toLine:cursorLine col:cursorCol-1.
+	].
     ].
     completionSupport notNil ifTrue:[ completionSupport postKeyPress:keyArg ].
 
@@ -5668,18 +5668,18 @@
 
     wasOn := cursorShown.
 
-    NoModificationError 
-        handle:[:ex |
-            self flashReadOnly.
-            (cursorShown not and:[wasOn]) ifTrue:[
-                self makeCursorVisibleAndShowCursor:wasOn.
-            ].
-        ] 
-        do:[
-            self undoableDo:[
-                self doKeyPress:key x:x y:y
-            ].
-        ].
+    NoModificationError
+	handle:[:ex |
+	    self flashReadOnly.
+	    (cursorShown not and:[wasOn]) ifTrue:[
+		self makeCursorVisibleAndShowCursor:wasOn.
+	    ].
+	]
+	do:[
+	    self undoableDo:[
+		self doKeyPress:key x:x y:y
+	    ].
+	].
 
     self repairDamage
 
@@ -5700,8 +5700,8 @@
      Any widget may suppress the ok/cancel, by returning false."
 
     acceptEnabled == false ifTrue:[
-        "/ nope -
-        ^ false
+	"/ nope -
+	^ false
     ].
     "/ cg: only do this if modified.
     "/ otherwise, users would have to make sure that the contents is
@@ -5709,7 +5709,7 @@
     "/ please check the expecco file-save or file-reimport dialog,
     "/ which has a problem with that behavior.
     self modified ifTrue:[
-        self accept.
+	self accept.
     ].
     ^ true.
 !
@@ -5722,7 +5722,7 @@
     cv := cursorVisibleLine.
     super sizeChanged:how.
     cv notNil ifTrue:[
-        self makeLineVisible:cursorLine
+	self makeLineVisible:cursorLine
     ]
 !
 
@@ -5730,7 +5730,7 @@
     super unmapped.
 
     completionSupport notNil ifTrue:[
-        completionSupport release.
+	completionSupport release.
     ].
 ! !
 
@@ -5740,7 +5740,7 @@
     super focusOut.
 
     completionSupport notNil ifTrue:[
-        completionSupport release.
+	completionSupport release.
     ].
 !
 
@@ -5753,19 +5753,19 @@
     (cursorShown
     and:[self enabled
     and:[self isReadOnly not]]) ifTrue:[
-        self drawCursor
+	self drawCursor
     ].
 
     hasKeyboardFocus ifFalse:[
-        completionSupport notNil ifTrue:[
-            "/ this is a hack for Windows:
-            "/ on windows, an activate:false event is first sent to my textView,
-            "/ then an activate is sent to the completion popup.
-            "/ this is done BEFORE the buttonPress event is delivered.
-            "/ therefore, allow for the activate of the completionMenu and it's button event to be processed.
-            "/ before forcing it to be closed...
-            completionSupport startTimeoutForEditViewLostFocus.
-        ].
+	completionSupport notNil ifTrue:[
+	    "/ this is a hack for Windows:
+	    "/ on windows, an activate:false event is first sent to my textView,
+	    "/ then an activate is sent to the completion popup.
+	    "/ this is done BEFORE the buttonPress event is delivered.
+	    "/ therefore, allow for the activate of the completionMenu and it's button event to be processed.
+	    "/ before forcing it to be closed...
+	    completionSupport startTimeoutForEditViewLostFocus.
+	].
     ].
 
     "Modified (format): / 06-11-2013 / 15:37:31 / cg"
@@ -5783,7 +5783,7 @@
 !
 
 showNoFocus:explicit
-    "the view lost the keyboard focus 
+    "the view lost the keyboard focus
      (either explicit, via tabbing; or implicit, by pointer movement)
       - change any display attributes as req'd."
 
@@ -5794,9 +5794,9 @@
     "/ the completion-menu is clicked on), and we don't want to kill the
     "/ completer. Otherwise, completion does not work when clocking into the list.
     explicit ifTrue:[
-        completionSupport notNil ifTrue:[
-            completionSupport release.
-        ].
+	completionSupport notNil ifTrue:[
+	    completionSupport release.
+	].
     ].
 !
 
@@ -5809,7 +5809,7 @@
      and:[self enabled
      and:[true "self isReadOnly not"]]]
     ) ifTrue:[
-        ^ true
+	^ true
     ].
 
     ^ false
@@ -5818,26 +5818,26 @@
 !EditTextView methodsFor:'formatting'!
 
 executekeyboardMacroNamed:macroName
-    "try to execute the keyboard macro; 
+    "try to execute the keyboard macro;
      return true if that worked, false otherwise"
 
     |cmdMacro|
 
     cmdMacro := UserPreferences current functionKeySequences at:macroName ifAbsent:[^ false].
     self
-        undoableDo:[ self executeKeyboardMacro:cmdMacro ]
-        info: macroName.
+	undoableDo:[ self executeKeyboardMacro:cmdMacro ]
+	info: macroName.
     ^ true
 
     "
       EditTextView open
-                contents:'bla';
-                selectAll;
-                executekeyboardMacroNamed:#IndentBy4.
+		contents:'bla';
+		selectAll;
+		executekeyboardMacroNamed:#IndentBy4.
       EditTextView open
-                contents:'bla';
-                selectAll;
-                executekeyboardMacroNamed:#blabla.
+		contents:'bla';
+		selectAll;
+		executekeyboardMacroNamed:#blabla.
     "
 
     "Modified: / 14-02-2012 / 11:17:27 / cg"
@@ -5855,12 +5855,12 @@
     start := selectionStartLine.
     end := selectionEndLine.
     (selectionEndCol == 0) ifTrue:[
-        end := end - 1
+	end := end - 1
     ].
     self unselect.
     self
-        undoableDo:[self indentFromLine:start toLine:end]
-        info:'Indent'
+	undoableDo:[self indentFromLine:start toLine:end]
+	info:'Indent'
 !
 
 indentBy4
@@ -5881,17 +5881,17 @@
     line1 := self selectionStartLine.
     line2 := self selectionEndLine.
     line1 isNil ifTrue:[
-        line1 := self cursorLine.
-        line1 notNil ifTrue:[
-            line2 := line1+1
-        ]
+	line1 := self cursorLine.
+	line1 notNil ifTrue:[
+	    line2 := line1+1
+	]
     ] ifFalse:[
-        line2 notNil ifTrue:[
-            self selectionEndCol == 0 ifTrue:[ line2 := line2 - 1 ].
-        ].                
-    ].                
+	line2 notNil ifTrue:[
+	    self selectionEndCol == 0 ifTrue:[ line2 := line2 - 1 ].
+	].
+    ].
     line1 notNil ifTrue:[
-        self indentFromLine:line1 toLine:line2 by:n.
+	self indentFromLine:line1 toLine:line2 by:n.
     ]
 !
 
@@ -5923,36 +5923,36 @@
 
     (delta == 0) ifTrue:[^ self].
     (delta > 0) ifTrue:[
-        spaces := String new:delta
+	spaces := String new:delta
     ].
 
     anyChange := false.
     start to:end do:[:lineNr |
-        line := self listAt:lineNr.
-        line notNil ifTrue:[
-            line isBlank ifTrue:[
-                self basicListAt:lineNr put:nil
-            ] ifFalse:[
-                (delta > 0) ifTrue:[
-                    line := spaces , line.
-                    widthOfWidestLine notNil ifTrue:[
-                        widthOfWidestLine := widthOfWidestLine max:(self widthOfLineString:line).
-                    ]
-                ] ifFalse:[
-                    "check if deletion is ok"
-                    d := delta negated + 1.
-
-                    line size > d ifTrue:[
-                        (line copyTo:(d - 1)) withoutSeparators isEmpty ifTrue:[
-                            line := line copyFrom:d
-                        ]
-                    ].
-                    widthOfWidestLine := nil
-                ].
-                self replaceLine:lineNr with:line.
-                anyChange := true.
-            ]
-        ]
+	line := self listAt:lineNr.
+	line notNil ifTrue:[
+	    line isBlank ifTrue:[
+		self basicListAt:lineNr put:nil
+	    ] ifFalse:[
+		(delta > 0) ifTrue:[
+		    line := spaces , line.
+		    widthOfWidestLine notNil ifTrue:[
+			widthOfWidestLine := widthOfWidestLine max:(self widthOfLineString:line).
+		    ]
+		] ifFalse:[
+		    "check if deletion is ok"
+		    d := delta negated + 1.
+
+		    line size > d ifTrue:[
+			(line copyTo:(d - 1)) withoutSeparators isEmpty ifTrue:[
+			    line := line copyFrom:d
+			]
+		    ].
+		    widthOfWidestLine := nil
+		].
+		self replaceLine:lineNr with:line.
+		anyChange := true.
+	    ]
+	]
     ].
 
     anyChange ifTrue:[ self textChanged ].
@@ -5976,18 +5976,18 @@
 
     "/ [lnr ~~ 1] whileTrue:[
     (lnr ~~ 1) ifTrue:[
-        lnr  := lnr - 1.
-        line := self listAt:lnr.
-
-        line notNil ifTrue:[
-            indent := line indexOfNonSeparatorStartingAt:1.
-            indent ~~ 0 ifTrue:[
-                (line endsWith:$[) ifTrue:[
-                    ^ indent + 4 - 1
-                ].
-                ^ indent - 1
-            ]
-        ]
+	lnr  := lnr - 1.
+	line := self listAt:lnr.
+
+	line notNil ifTrue:[
+	    indent := line indexOfNonSeparatorStartingAt:1.
+	    indent ~~ 0 ifTrue:[
+		(line endsWith:$[) ifTrue:[
+		    ^ indent + 4 - 1
+		].
+		^ indent - 1
+	    ]
+	]
     ].
     ^ 0
 
@@ -6049,18 +6049,18 @@
     cursorBgColor isNil ifTrue:[cursorBgColor := fgColor].
     cursorType isNil ifTrue:[cursorType := DefaultCursorType].
     cursorTypeNoFocus isNil ifTrue:[
-        cursorTypeNoFocus := cursorType.
-        DefaultCursorTypeNoFocus notNil ifTrue:[
-            cursorTypeNoFocus := DefaultCursorTypeNoFocus.
-        ]
+	cursorTypeNoFocus := cursorType.
+	DefaultCursorTypeNoFocus notNil ifTrue:[
+	    cursorTypeNoFocus := DefaultCursorTypeNoFocus.
+	]
     ].
     cursorNoFocusFgColor := DefaultCursorNoFocusForegroundColor.
     cursorNoFocusFgColor isNil ifTrue:[
-        cursorType ~~ #block ifTrue:[
-            cursorNoFocusFgColor := cursorBgColor
-        ] ifFalse:[
-            cursorNoFocusFgColor := cursorFgColor
-        ]
+	cursorType ~~ #block ifTrue:[
+	    cursorNoFocusFgColor := cursorBgColor
+	] ifFalse:[
+	    cursorNoFocusFgColor := cursorFgColor
+	]
     ].
 
     "Modified: / 15.12.1999 / 22:27:45 / cg"
@@ -6109,9 +6109,9 @@
     |supportClass|
 
     completionSupport isNil ifTrue:[
-        (supportClass := self completionSupportClass) notNil ifTrue:[
-            completionSupport := supportClass for:self.            
-        ].
+	(supportClass := self completionSupportClass) notNil ifTrue:[
+	    completionSupport := supportClass for:self.
+	].
     ].
 
     "Created: / 26-09-2013 / 17:51:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
@@ -6119,7 +6119,7 @@
 
 release
     completionSupport notNil ifTrue:[
-        completionSupport release
+	completionSupport release
     ].
     super release
 ! !
@@ -6130,21 +6130,21 @@
     "replay the characters as learned previously"
 
     (self learnMode not and:[learnedMacro size > 0]) ifTrue:[
-        ExecutingMacroQuery 
-            answer:true
-            do:[
-                learnedMacro do:[:event |
-                            WindowGroup lastEventQuerySignal answer:event
-                            do:[
-                                self
-                                    dispatchEvent:event
-                                    withFocusOn:nil
-                                    delegate:false
-                            ]
-                ]
-            ].
+	ExecutingMacroQuery
+	    answer:true
+	    do:[
+		learnedMacro do:[:event |
+			    WindowGroup lastEventQuerySignal answer:event
+			    do:[
+				self
+				    dispatchEvent:event
+				    withFocusOn:nil
+				    delegate:false
+			    ]
+		]
+	    ].
     ] ifFalse:[
-        self flash:'no macro'.
+	self flash:'no macro'.
     ].
 !
 
@@ -6162,12 +6162,12 @@
     self learnModeHolder value:aBoolean.
 
     aBoolean ifTrue:[
-        learnedMacro := OrderedCollection new.
-        fg := Color white.
-        bg := Color black.
+	learnedMacro := OrderedCollection new.
+	fg := Color white.
+	bg := Color black.
     ] ifFalse:[
-        cursorFgColor := fg := (DefaultCursorForegroundColor ? bgColor).
-        cursorBgColor := bg := (DefaultCursorBackgroundColor ? fgColor).
+	cursorFgColor := fg := (DefaultCursorForegroundColor ? bgColor).
+	cursorBgColor := bg := (DefaultCursorBackgroundColor ? fgColor).
     ].
     self cursorForegroundColor:fg backgroundColor:bg.
 !
@@ -6176,14 +6176,14 @@
     "a holder returning true, if in learn mode"
 
     learnMode isNil ifTrue:[
-        learnMode := ValueHolder with:false
+	learnMode := ValueHolder with:false
     ].
     ^ learnMode
 !
 
 rememberLearnedMacroAs: nameString
     Macros isNil ifTrue:[
-        Macros := Dictionary new.
+	Macros := Dictionary new.
     ].
     Macros at:nameString put:learnedMacro
 !
@@ -6205,19 +6205,19 @@
     original size == 0 ifTrue:[^ self].
 
     self withWaitCursorDo:[
-        (HostNameLookupError , SOAP::SoapImplError) handle:[:ex |
-            Dialog warn:('Translation failed - WEB Service error:\\%1.' bindWith:ex description allBold) withCRs
-        ] do:[
-            translated := SOAP::BabelFishClient new translate:original mode:fromToModeString.
-        ]
+	(HostNameLookupError , SOAP::SoapImplError) handle:[:ex |
+	    Dialog warn:('Translation failed - WEB Service error:\\%1.' bindWith:ex description allBold) withCRs
+	] do:[
+	    translated := SOAP::BabelFishClient new translate:original mode:fromToModeString.
+	]
     ].
 
     "/ v pasteOrReplace:translated
     self cursorLine:(self selectionEndLine) col:(self selectionEndCol + 1).
     self unselect.
-    self 
-        undoablePaste:translated 
-        info:'Translate'
+    self
+	undoablePaste:translated
+	info:'Translate'
 
     "Modified: / 28-07-2007 / 13:27:21 / cg"
 !
@@ -6229,24 +6229,24 @@
 
     t2 := self getClipboardText.
     t2 isEmptyOrNil ifTrue:[
-        Dialog information:'Clipboard is empty.'.
-        ^ self.
+	Dialog information:'Clipboard is empty.'.
+	^ self.
     ].
 
     self hasSelection ifTrue:[
-        t1 := self selectionAsString.
+	t1 := self selectionAsString.
     ] ifFalse:[
-        t1 := self contents asString
+	t1 := self contents asString
     ].
     t1 := t1 string.
 
     t1 = t2 ifTrue:[
-        Dialog information:'Strings are equal.'.
-        ^ self.
+	Dialog information:'Strings are equal.'.
+	^ self.
     ].
     DiffTextView
-        openOn:t1 label:'Editor'
-        and:t2 label:'Clipboard'
+	openOn:t1 label:'Editor'
+	and:t2 label:'Clipboard'
 !
 
 copySelection
@@ -6254,7 +6254,7 @@
      Redefined to move the (currently hidden cursor) to the selection's end"
 
     self hasSelection ifTrue:[
-        self setCursorLine:selectionEndLine col:selectionEndCol+1
+	self setCursorLine:selectionEndLine col:selectionEndCol+1
     ].
     super copySelection.
 
@@ -6271,7 +6271,7 @@
     "return a default value to show in the gotoLine box"
 
     cursorLine notNil ifTrue:[
-        ^ cursorLine
+	^ cursorLine
     ].
     ^ super defaultForGotoLine
 !
@@ -6282,49 +6282,49 @@
     |line col history sel |
 
     (self checkModificationsAllowed) ifFalse:[
-        self flashReadOnly.
-        ^ self
+	self flashReadOnly.
+	^ self
     ].
 
     sel := self selection.
     sel notNil ifTrue:[
-        self setLastStringToReplace: sel.
-
-        line := selectionStartLine.
-        col := selectionStartCol.
-
-        toClipboard ifTrue:[
-            "
-             remember in CopyBuffer
-            "
-            self setClipboardText:sel. "/ lastString.
-        ].
-
-        "
-         append to DeleteHistory (if there is one)
-        "
-        history := Smalltalk at:#DeleteHistory.
-        history notNil ifTrue:[
-            history addAll:(sel asStringCollection).
-            history size > 1000 ifTrue:[
-                history := history copyFrom:(history size - 1000)
-            ].
-        ].
-
-        "
-         now, delete it
-        "
-        self 
-            undoableDo:[self deleteSelection] 
-            info:'Delete'.
-        lastReplacementInfo lastReplacement: nil
+	self setLastStringToReplace: sel.
+
+	line := selectionStartLine.
+	col := selectionStartCol.
+
+	toClipboard ifTrue:[
+	    "
+	     remember in CopyBuffer
+	    "
+	    self setClipboardText:sel. "/ lastString.
+	].
+
+	"
+	 append to DeleteHistory (if there is one)
+	"
+	history := Smalltalk at:#DeleteHistory.
+	history notNil ifTrue:[
+	    history addAll:(sel asStringCollection).
+	    history size > 1000 ifTrue:[
+		history := history copyFrom:(history size - 1000)
+	    ].
+	].
+
+	"
+	 now, delete it
+	"
+	self
+	    undoableDo:[self deleteSelection]
+	    info:'Delete'.
+	lastReplacementInfo lastReplacement: nil
     ] ifFalse:[
-        "
-         a cut without selection will search&cut again
-        "
-        self undoableDo:[
-            self again
-        ]
+	"
+	 a cut without selection will search&cut again
+	"
+	self undoableDo:[
+	    self again
+	]
     ]
 
     "Modified: / 5.4.1998 / 16:51:53 / cg"
@@ -6333,59 +6333,59 @@
 editMenu
     "return the views middleButtonMenu"
 
-    <resource: #keyboard (#Again #AgainForAll #Copy #Cut #Paste #Accept 
-                          #Find #GotoLine #SaveAs #Print
-                          #PasteFromHistory #Join #Wrap #Undo #Redo 
-                          #ToggleAutoIndent #ToggleInsertMode 
-                          #LearnKeyboardMacro #ExecuteKeyboardMacro )>
+    <resource: #keyboard (#Again #AgainForAll #Copy #Cut #Paste #Accept
+			  #Find #GotoLine #SaveAs #Print
+			  #PasteFromHistory #Join #Wrap #Undo #Redo
+			  #ToggleAutoIndent #ToggleInsertMode
+			  #LearnKeyboardMacro #ExecuteKeyboardMacro )>
     <resource: #programMenu>
 
     |items m sub translateItems sortItems miscItems toolItems subSub toolSub
      transSub sortSub what undoIdx redoIdx sensor main mainItems|
 
     items := #(
-                    ('Redo'             redo           Redo        )
-                    ('Again (for All)'  multipleAgain  AgainForAll )
-                    ('-'                                        )
-                    ('Search...'        search         Find     )
-                    ('Goto Line...'     gotoLine       GotoLine )
-                    ('-'                                        )
-                    ('Tools'            tools                   )
-                    ('Font...'           changeFont             )
-                    ('Insert Unicode...' insertUnicode )
-            ).
+		    ('Redo'             redo           Redo        )
+		    ('Again (for All)'  multipleAgain  AgainForAll )
+		    ('-'                                        )
+		    ('Search...'        search         Find     )
+		    ('Goto Line...'     gotoLine       GotoLine )
+		    ('-'                                        )
+		    ('Tools'            tools                   )
+		    ('Font...'           changeFont             )
+		    ('Insert Unicode...' insertUnicode )
+	    ).
     CharacterSetView notNil ifTrue:[
-        items := items ,
-                    #(
-                        ('Special Characters...'    specialCharacters  OpenSpecialCharacterWindow )
-                    ).
+	items := items ,
+		    #(
+			('Special Characters...'    specialCharacters  OpenSpecialCharacterWindow )
+		    ).
     ].
     items := items , #(
-                    ('-'                                        )
-                    ('Save As...'       save           SaveAs   )
-                    ('Print'            doPrint        Print    )
-                    ('='                                        )
-                    ('Misc'             misc           ShiftCtrl) ).
+		    ('-'                                        )
+		    ('Save As...'       save           SaveAs   )
+		    ('Print'            doPrint        Print    )
+		    ('='                                        )
+		    ('Misc'             misc           ShiftCtrl) ).
 
     miscItems := #(
-                    ('AutoIndent \c'    autoIndent:                  ToggleAutoIndent )
-                    ('InsertMode \c'    insertMode:                  ToggleInsertMode )
-                    ('-'                                        )
-                    ('Paste Previous...'   pasteOrReplaceFromHistory PasteFromHistory )
-                    ('Join Lines'       joinLines                    Join )
-                    ('Wrap Lines...'    wrapLines                    Wrap )
-                    ('-'                                        )
-                    ('Learn Macro'      learnMode:                   LearnKeyboardMacro)
-                    ('Execute Macro'    executeLearnedKeyboardMacro  ExecuteKeyboardMacro )
-                    ('-'                                        )
-                    ('Insert File...'           insertFile          )
-                    ('Insert URL Contents...'   insertURL           )
-                    ('Insert new UUID'      insertUUID          )
-                    ('Insert Date && Time'  insertDateAndTime   )
-                    ('-'                                        )
-                    ('Insert File as String Literal...' insertFileAsStringLiteral  )
-                    ('Paste as String Literal'          pasteAsStringLiteral       )
-                ).
+		    ('AutoIndent \c'    autoIndent:                  ToggleAutoIndent )
+		    ('InsertMode \c'    insertMode:                  ToggleInsertMode )
+		    ('-'                                        )
+		    ('Paste Previous...'   pasteOrReplaceFromHistory PasteFromHistory )
+		    ('Join Lines'       joinLines                    Join )
+		    ('Wrap Lines...'    wrapLines                    Wrap )
+		    ('-'                                        )
+		    ('Learn Macro'      learnMode:                   LearnKeyboardMacro)
+		    ('Execute Macro'    executeLearnedKeyboardMacro  ExecuteKeyboardMacro )
+		    ('-'                                        )
+		    ('Insert File...'           insertFile          )
+		    ('Insert URL Contents...'   insertURL           )
+		    ('Insert new UUID'      insertUUID          )
+		    ('Insert Date && Time'  insertDateAndTime   )
+		    ('-'                                        )
+		    ('Insert File as String Literal...' insertFileAsStringLiteral  )
+		    ('Paste as String Literal'          pasteAsStringLiteral       )
+		).
 "/    CharacterSetView notNil ifTrue:[
 "/        miscItems := miscItems ,
 "/                    #(
@@ -6399,58 +6399,58 @@
 "/                    ('Font...'                  changeFont              )
 "/"/                    ('Encoding...'      changeEncoding          )
 "/                ).
-"/    ]. 
+"/    ].
 
     translateItems := #(
-                    ('English -> German'      (babelFishTranslate: 'en_de')   )
-                    ('English -> French'      (babelFishTranslate: 'en_fr')   )
-                    ('English -> Italian'     (babelFishTranslate: 'en_it')   )
-                    ('English -> Spanish'     (babelFishTranslate: 'en_es')   )
-                    ('English -> Portuguese'  (babelFishTranslate: 'en_pt')   )
-                    ('-'                                        )
-                    ('German -> English'      (babelFishTranslate: 'de_en')   )
-                    ('French -> English'      (babelFishTranslate: 'fr_en')   )
-                    ('Italian -> English'     (babelFishTranslate: 'it_en')   )
-                    ('Spanish -> English'     (babelFishTranslate: 'es_en')   )
-                    ('Portuguese -> English'  (babelFishTranslate: 'pt_en')   )
-              ).
+		    ('English -> German'      (babelFishTranslate: 'en_de')   )
+		    ('English -> French'      (babelFishTranslate: 'en_fr')   )
+		    ('English -> Italian'     (babelFishTranslate: 'en_it')   )
+		    ('English -> Spanish'     (babelFishTranslate: 'en_es')   )
+		    ('English -> Portuguese'  (babelFishTranslate: 'en_pt')   )
+		    ('-'                                        )
+		    ('German -> English'      (babelFishTranslate: 'de_en')   )
+		    ('French -> English'      (babelFishTranslate: 'fr_en')   )
+		    ('Italian -> English'     (babelFishTranslate: 'it_en')   )
+		    ('Spanish -> English'     (babelFishTranslate: 'es_en')   )
+		    ('Portuguese -> English'  (babelFishTranslate: 'pt_en')   )
+	      ).
 
     sortItems := #(
-                    ('Lines'                            (sortSelection:ignoreCase: #lines false)        )
-                    ('Lines by First Word'              (sortSelection:ignoreCase: #linesByFirstWord false)     )
-                    ('Lines by n''th Word'              (sortSelection:ignoreCase: #linesByNthWord false)       )
-                    ('Lines by n''th Number'            (sortSelection:ignoreCase: #linesByNthNumber false)     )
-                    ('Lines by n''th Hex Number'        (sortSelection:ignoreCase: #linesByNthHexNumber false)     )
-                    ('Words'                            (sortSelection:ignoreCase: #words false)        )
-                    ('-'                                                      )
-                    ('Lines (ignore case)'               (sortSelection:ignoreCase: #lines true)         )
-                    ('Lines by First Word (ignore case)' (sortSelection:ignoreCase: #linesByFirstWord true)      )
-                    ('Lines by n''th Word (ignore case)' (sortSelection:ignoreCase: #linesByNthWord true)        )
-                    ('Words (ignore case)'               (sortSelection:ignoreCase: #words true)         )
-                    ('-'                                                      )
-                    ('By Line Length'                    (sortSelection:ignoreCase: #linesByLength nil)         )
-                    ('Reverse'                           (sortSelection:ignoreCase: #reverse       nil)         )
-              ).
+		    ('Lines'                            (sortSelection:ignoreCase: #lines false)        )
+		    ('Lines by First Word'              (sortSelection:ignoreCase: #linesByFirstWord false)     )
+		    ('Lines by n''th Word'              (sortSelection:ignoreCase: #linesByNthWord false)       )
+		    ('Lines by n''th Number'            (sortSelection:ignoreCase: #linesByNthNumber false)     )
+		    ('Lines by n''th Hex Number'        (sortSelection:ignoreCase: #linesByNthHexNumber false)     )
+		    ('Words'                            (sortSelection:ignoreCase: #words false)        )
+		    ('-'                                                      )
+		    ('Lines (ignore case)'               (sortSelection:ignoreCase: #lines true)         )
+		    ('Lines by First Word (ignore case)' (sortSelection:ignoreCase: #linesByFirstWord true)      )
+		    ('Lines by n''th Word (ignore case)' (sortSelection:ignoreCase: #linesByNthWord true)        )
+		    ('Words (ignore case)'               (sortSelection:ignoreCase: #words true)         )
+		    ('-'                                                      )
+		    ('By Line Length'                    (sortSelection:ignoreCase: #linesByLength nil)         )
+		    ('Reverse'                           (sortSelection:ignoreCase: #reverse       nil)         )
+	      ).
 
     toolItems := #(
-                    ('Indent'                      indent                     )
-                    ('Toggle Case'      convertSelectionToLowercaseOrUppercaseOrUppercaseFirst   ConvertSelectionToLowercaseOrUppercaseOrUppercaseFirst)
-                    ('Sort'                        sort                       )
-                    ('Split...'                    splitLinesAtCharacterOrString )
-                    ('-'                                                      )
-                    ('Google Spell Check'          googleSpellingSuggestion   )
-                    ('Builtin Spell Check'         internalSpellingSuggestion   )
-                    ('Translate'                   babelFishTranslate         )
-                    ('Compare with Clipboard...'   compareWithClipboard       )
-              ).
+		    ('Indent'                      indent                     )
+		    ('Toggle Case'      convertSelectionToLowercaseOrUppercaseOrUppercaseFirst   ConvertSelectionToLowercaseOrUppercaseOrUppercaseFirst)
+		    ('Sort'                        sort                       )
+		    ('Split...'                    splitLinesAtCharacterOrString )
+		    ('-'                                                      )
+		    ('Google Spell Check'          googleSpellingSuggestion   )
+		    ('Builtin Spell Check'         internalSpellingSuggestion   )
+		    ('Translate'                   babelFishTranslate         )
+		    ('Compare with Clipboard...'   compareWithClipboard       )
+	      ).
 
     Smalltalk isStandAloneApp ifFalse:[
-        toolItems := toolItems , #(
-                        ('-'                                                      )
-                        ('Open FileBrowser on It'      openFileBrowserOnIt        )
-                        ('Open Workspace with It'      openWorkspaceWithIt        )
-                        ('Inspect Selected String'     inspectSelectedString      )
-                  ).
+	toolItems := toolItems , #(
+			('-'                                                      )
+			('Open FileBrowser on It'      openFileBrowserOnIt        )
+			('Open Workspace with It'      openWorkspaceWithIt        )
+			('Inspect Selected String'     inspectSelectedString      )
+		  ).
     ].
 
     sub := PopUpMenu itemList:items resources:resources performer:model.
@@ -6477,92 +6477,92 @@
     sub subMenuAt:#misc put:subSub.
 
     mainItems := #(
-                    ('Undo'    undo             Undo   )
-                    ('Again'   again            Again  )
-                    ('-'                               )
-                    ('Cut'     cut              Cut    )
-                    ('Copy'    copySelection    Copy   )
-                    ('Paste'   pasteOrReplace   Paste  )
-                    ('-'                               )
-                    ('Accept'  accept           Accept )
-                    ('='                               )
-                    ('More'    others           Ctrl   )
-              ).
+		    ('Undo'    undo             Undo   )
+		    ('Again'   again            Again  )
+		    ('-'                               )
+		    ('Cut'     cut              Cut    )
+		    ('Copy'    copySelection    Copy   )
+		    ('Paste'   pasteOrReplace   Paste  )
+		    ('-'                               )
+		    ('Accept'  accept           Accept )
+		    ('='                               )
+		    ('More'    others           Ctrl   )
+	      ).
     main := PopUpMenu itemList:mainItems resources:resources.
     main subMenuAt:#others put:sub.
 
     sensor := self sensor.
     (sensor notNil and:[sensor ctrlDown]) ifTrue:[
        sensor shiftDown ifTrue:[
-            m := subSub
-        ] ifFalse:[
-            m := sub
-        ]
+	    m := subSub
+	] ifFalse:[
+	    m := sub
+	]
     ] ifFalse:[
-        m := main
+	m := main
     ].
 
     "/ the 'Smalltalk at:' code is here to
     "/ avoid making the SOAP package a prerequisite for this package (libwidg)
     (Smalltalk at:#'SOAP::GoogleClient') isNil ifTrue:[
-        "/ GoogleClient new spellingSuggestionOf: 'Smmalltlaak and Soaap'.
-        m disable:#googleSpellingSuggestion
+	"/ GoogleClient new spellingSuggestionOf: 'Smmalltlaak and Soaap'.
+	m disable:#googleSpellingSuggestion
     ].
     (Smalltalk at:#'RBSpellChecker') isNil ifTrue:[
-        m disable:#internalSpellingSuggestion
+	m disable:#internalSpellingSuggestion
     ].
 
     HTTPInterface isNil ifTrue:[
-        m disableAll:#(insertURL)
+	m disableAll:#(insertURL)
     ].
 
     self isReadOnly ifTrue:[
-        m disableAll:#(accept undo again multipleAgain redo
-                       paste pasteOrReplace pasteOrReplaceFromHistory
-                       cut indent autoIndent: insertMode:
-                       insertFile insertFileAsStringLiteral insertURL
-                       babelFishTranslate googleSpellingSuggestion sort
-                       convertSelectionToLowercaseOrUppercaseOrUppercaseFirst 
-                       joinLines wrapLines insertUUID insertDateAndTime pasteAsStringLiteral
-                       insertUnicode specialCharacters)
+	m disableAll:#(accept undo again multipleAgain redo
+		       paste pasteOrReplace pasteOrReplaceFromHistory
+		       cut indent autoIndent: insertMode:
+		       insertFile insertFileAsStringLiteral insertURL
+		       babelFishTranslate googleSpellingSuggestion sort
+		       convertSelectionToLowercaseOrUppercaseOrUppercaseFirst
+		       joinLines wrapLines insertUUID insertDateAndTime pasteAsStringLiteral
+		       insertUnicode specialCharacters)
     ].
     self hasSelectionForCopy ifFalse:[
-        m disable:#copySelection.
+	m disable:#copySelection.
     ].
     self hasSelection ifFalse:[
-        m disableAll:#(cut googleSpellingSuggestion babelFishTranslate openFileBrowserOnIt 
-                       openWorkspaceWithIt sort indent splitLinesAtCharacterOrString inspectSelectedString).
+	m disableAll:#(cut googleSpellingSuggestion babelFishTranslate openFileBrowserOnIt
+		       openWorkspaceWithIt sort indent splitLinesAtCharacterOrString inspectSelectedString).
     ] ifTrue:[
-        (Error handle:[:ex |
-            ex return:false
-        ] do:[
-            |fn|
-            fn := self selectionAsString.
-            fn asFilename exists or:[ fn withoutSeparators withoutQuotes asFilename exists ]
-        ]) ifFalse:[
-            m disableAll:#(openFileBrowserOnIt).
-        ]
+	(Error handle:[:ex |
+	    ex return:false
+	] do:[
+	    |fn|
+	    fn := self selectionAsString.
+	    fn asFilename exists or:[ fn withoutSeparators withoutQuotes asFilename exists ]
+	]) ifFalse:[
+	    m disableAll:#(openFileBrowserOnIt).
+	]
     ].
     self hasUndoAction ifFalse:[
-        m disable:#undo.
+	m disable:#undo.
     ] ifTrue:[
-        what := undoSupport undoActionInfo.
-        what notNil ifTrue:[
-            undoIdx := m indexOf:#undo.
-            m labelAt:undoIdx put:(resources string:'Undo (%1)' with:what).
-        ]
+	what := undoSupport undoActionInfo.
+	what notNil ifTrue:[
+	    undoIdx := m indexOf:#undo.
+	    m labelAt:undoIdx put:(resources string:'Undo (%1)' with:what).
+	]
     ].
     self hasRedoAction ifFalse:[
-        sub disable:#redo.
+	sub disable:#redo.
     ] ifTrue:[
-        what := undoSupport redoActionInfo.
-        what notNil ifTrue:[
-            redoIdx := sub indexOf:#redo.
-            sub labelAt:redoIdx put:(resources string:'Redo (%1)' with:what).
-        ]
+	what := undoSupport redoActionInfo.
+	what notNil ifTrue:[
+	    redoIdx := sub indexOf:#redo.
+	    sub labelAt:redoIdx put:(resources string:'Redo (%1)' with:what).
+	]
     ].
     self canAccept ifFalse:[
-        m disable:#accept
+	m disable:#accept
     ].
     ^ m.
 
@@ -6574,22 +6574,22 @@
 
     history := device getCopyBufferHistory copy.
     list := history collect:[:entry |
-                |text shown|
-
-                text := entry asString string asCollectionOfLines.
-                shown := text detect:[:line| line notEmptyOrNil] ifNone:['      '].
-                text size > 1 ifTrue:[
-                    shown := shown,(resources string:' ... [%1 lines]' with:text size).
-                ].
-                shown
-            ].
+		|text shown|
+
+		text := entry asString string asCollectionOfLines.
+		shown := text detect:[:line| line notEmptyOrNil] ifNone:['      '].
+		text size > 1 ifTrue:[
+		    shown := shown,(resources string:' ... [%1 lines]' with:text size).
+		].
+		shown
+	    ].
 
     box := ListSelectionBox
-                title:(resources string:'Clipboard History')
-                okText:(resources string:'Paste')
-                abortText:(resources string:'Cancel')
-                list:list
-                action:[:idx | idx notNil ifTrue:[sel := history at:idx]].
+		title:(resources string:'Clipboard History')
+		okText:(resources string:'Paste')
+		abortText:(resources string:'Cancel')
+		list:list
+		action:[:idx | idx notNil ifTrue:[sel := history at:idx]].
     box label:(resources string:'Select Previous Copybuffer String').
     box useIndex:true.
     box show.
@@ -6601,7 +6601,7 @@
 getTextSelectionOrTextSelectionFromHistory
 
     self sensor shiftDown ifTrue:[
-        ^ self getTextSelectionFromHistory
+	^ self getTextSelectionFromHistory
     ].
 
     "/ return either the (xterm-) selection or the clipBoard depending on
@@ -6626,26 +6626,26 @@
     |text suggestion|
 
     self withWaitCursorDo:[
-        text := self selection asString string withoutSeparators.
-        text size == 0 ifTrue:[^ self].
-
-        "/ the 'Smalltalk at:' code is here to
-        "/ avoid making the SOAP package a prerequisite for this package (libwidg)
-        (Smalltalk at:#'SOAP::SoapImplError') handle:[:ex |
-            Dialog warn:('Spelling correction failed - WEB Service error:\\%1.' bindWith:ex description allBold) withCRs.
-            ^ self.
-        ] do:[
-            suggestion := (Smalltalk at:#'SOAP::GoogleClient') new spellingSuggestionOf:text.
-        ].
-        suggestion size == 0 ifTrue:[
-            self information:('No spelling suggestion from Google for: ' , text).
-            Transcript showCR:('No spelling suggestion from Google for: ' , text).
-            ^ self.
-        ].
-    ].
-    self 
-        undoablePaste:suggestion 
-        info:'Spelling Suggestion'.
+	text := self selection asString string withoutSeparators.
+	text size == 0 ifTrue:[^ self].
+
+	"/ the 'Smalltalk at:' code is here to
+	"/ avoid making the SOAP package a prerequisite for this package (libwidg)
+	(Smalltalk at:#'SOAP::SoapImplError') handle:[:ex |
+	    Dialog warn:('Spelling correction failed - WEB Service error:\\%1.' bindWith:ex description allBold) withCRs.
+	    ^ self.
+	] do:[
+	    suggestion := (Smalltalk at:#'SOAP::GoogleClient') new spellingSuggestionOf:text.
+	].
+	suggestion size == 0 ifTrue:[
+	    self information:('No spelling suggestion from Google for: ' , text).
+	    Transcript showCR:('No spelling suggestion from Google for: ' , text).
+	    ^ self.
+	].
+    ].
+    self
+	undoablePaste:suggestion
+	info:'Spelling Suggestion'.
 
     "Modified: / 28-07-2007 / 13:25:10 / cg"
 !
@@ -6655,8 +6655,8 @@
 
     typeOfSelection := nil.
     self
-        undoableDo:[ self pasteOrReplace:(Timestamp now printStringRFC1123Format)]
-        info:'Paste Date and Time'
+	undoableDo:[ self pasteOrReplace:(Timestamp now printStringRFC1123Format)]
+	info:'Paste Date and Time'
 !
 
 insertFile
@@ -6684,41 +6684,41 @@
     and:[ (selFn := sel asFilename) exists
     and:[ selFn isRegularFile ]])
     ifTrue:[
-        initial := selFn pathName.
+	initial := selFn pathName.
     ].
 
     [
-        |why|
-
-        file := Dialog
-            requestFileName:(resources string:'Insert Contents Of:')
-            default:initial
-            ok:(resources string:'Insert')
-            abort:(resources string:'Cancel')
-            pattern:nil
-            fromDirectory:directoryForFileDialog.
-        file isNil ifTrue:[
-            "cancel"
-            ^ self.
-        ].
-        file := file asFilename.
-        directoryForFileDialog := file.
-
-        ok := file isReadable and:[file isDirectory not].
-        ok ifFalse:[
-            file isReadable ifFalse:[
-                why := '%1 is unreadable.\\Please try again.'
-            ] ifTrue:[
-                why := '%1 is a directory.\\Please try again.'
-            ].
-            Dialog warn:(resources stringWithCRs:why with:file pathName).
-        ].
+	|why|
+
+	file := Dialog
+	    requestFileName:(resources string:'Insert Contents Of:')
+	    default:initial
+	    ok:(resources string:'Insert')
+	    abort:(resources string:'Cancel')
+	    pattern:nil
+	    fromDirectory:directoryForFileDialog.
+	file isNil ifTrue:[
+	    "cancel"
+	    ^ self.
+	].
+	file := file asFilename.
+	directoryForFileDialog := file.
+
+	ok := file isReadable and:[file isDirectory not].
+	ok ifFalse:[
+	    file isReadable ifFalse:[
+		why := '%1 is unreadable.\\Please try again.'
+	    ] ifTrue:[
+		why := '%1 is a directory.\\Please try again.'
+	    ].
+	    Dialog warn:(resources stringWithCRs:why with:file pathName).
+	].
     ] doUntil:[ok].
 
     text := file contentsAsString.
     self
-        undoableDo:[ self paste:(asStringLiteral ifTrue:[text storeString] ifFalse:[text]) ]
-        info:'Paste File'
+	undoableDo:[ self paste:(asStringLiteral ifTrue:[text storeString] ifFalse:[text]) ]
+	info:'Paste File'
 
     "Modified: / 28-07-2007 / 13:23:32 / cg"
 !
@@ -6738,30 +6738,30 @@
 
     (sel := self selectionAsString) notEmptyOrNil
     ifTrue:[
-        initial := sel.
+	initial := sel.
     ].
 
     url := Dialog
-        request:(resources string:'Insert Contents of URL:')
-        initialAnswer:initial
-        okLabel:(resources string:'Insert')
-        title:(resources string:'URL').
+	request:(resources string:'Insert Contents of URL:')
+	initialAnswer:initial
+	okLabel:(resources string:'Insert')
+	title:(resources string:'URL').
     url isNil ifTrue:[
-        "cancel"
-        ^ self.
+	"cancel"
+	^ self.
     ].
     response := HTTPInterface get:url.
     response isErrorResponse ifTrue:[
-        Dialog warn:(resources string:'Could not fetch the document: %1' with:url).
-        ^ self.
+	Dialog warn:(resources string:'Could not fetch the document: %1' with:url).
+	^ self.
     ].
     text := response data asString.
 
     self
-        undoableDo:[ 
-            self paste:(asStringLiteral ifTrue:[text storeString] ifFalse:[text]) 
-        ]
-        info:'Insert Contents of URL'
+	undoableDo:[
+	    self paste:(asStringLiteral ifTrue:[text storeString] ifFalse:[text])
+	]
+	info:'Insert Contents of URL'
 !
 
 insertUUID
@@ -6769,8 +6769,8 @@
 
     typeOfSelection := nil.
     self
-        undoableDo:[ self pasteOrReplace:(UUID genUUID printString)]
-        info:'Paste New UUID'
+	undoableDo:[ self pasteOrReplace:(UUID genUUID printString)]
+	info:'Paste New UUID'
 
     "Created: / 28-07-2007 / 13:01:16 / cg"
 !
@@ -6782,14 +6782,14 @@
 
     unicodeString := Dialog request:'Enter unicode (U+01FF or decimal number):'.
     unicodeString size < 2 ifTrue:[
-        ^ self.
+	^ self.
     ].
     (unicodeString second = $+ and:['Uu' includes:unicodeString first]) ifTrue:[
-        unicodePoint := Integer readFrom:(unicodeString copyFrom:3) radix:16 onError:[^ self].
+	unicodePoint := Integer readFrom:(unicodeString copyFrom:3) radix:16 onError:[^ self].
     ] ifFalse:[
-        unicodePoint := Integer readFrom:unicodeString onError:[^ self].
-    ].
-        
+	unicodePoint := Integer readFrom:unicodeString onError:[^ self].
+    ].
+
     unicodeChar := Character value:unicodePoint.
     self keyPress:unicodeChar x:0 y:0.
     self keyRelease:unicodeChar x:0 y:0.
@@ -6808,21 +6808,21 @@
     |text suggestions best|
 
     self withWaitCursorDo:[
-        text := self selection asString string withoutSeparators.
-        text size == 0 ifTrue:[^ self].
-
-        suggestions := RBSpellChecker default bestMatchesFor:text.
-        suggestions size == 0 ifTrue:[
-            self information:('No spelling suggestion from builtin checker for: ' , text).
-            Transcript showCR:('No spelling suggestion from builtin checker for: ' , text).
-            ^ self.
-        ].
-        Transcript showCR:suggestions.
-        best := suggestions first.
-    ].
-    self 
-        undoablePaste:best 
-        info:'Spelling Suggestion'.
+	text := self selection asString string withoutSeparators.
+	text size == 0 ifTrue:[^ self].
+
+	suggestions := RBSpellChecker default bestMatchesFor:text.
+	suggestions size == 0 ifTrue:[
+	    self information:('No spelling suggestion from builtin checker for: ' , text).
+	    Transcript showCR:('No spelling suggestion from builtin checker for: ' , text).
+	    ^ self.
+	].
+	Transcript showCR:suggestions.
+	best := suggestions first.
+    ].
+    self
+	undoablePaste:best
+	info:'Spelling Suggestion'.
 !
 
 openFileBrowserOnFileNamed:fileNameString
@@ -6832,13 +6832,13 @@
 
     fn := fileNameString asFilename.
     fn exists ifFalse:[
-        fn := fileNameString withoutSeparators withoutQuotes asFilename.
-        fn exists ifFalse:[
-            ^ self warn:(resources 
-                            string:'Sorry - file "%1" was not found in directory "%2"' 
-                            with:fn baseName allBold
-                            with:fn directory baseName allBold).
-        ].
+	fn := fileNameString withoutSeparators withoutQuotes asFilename.
+	fn exists ifFalse:[
+	    ^ self warn:(resources
+			    string:'Sorry - file "%1" was not found in directory "%2"'
+			    with:fn baseName allBold
+			    with:fn directory baseName allBold).
+	].
     ].
     UserPreferences fileBrowserClass openOn:fn
 
@@ -6872,10 +6872,10 @@
      Then paste at cursor position."
 
     self checkModificationsAllowed ifTrue:[
-        self withSelfAndTextForPasteDo:[:me :text |
-            me unselect.
-            me undoablePaste:text
-        ]
+	self withSelfAndTextForPasteDo:[:me :text |
+	    me unselect.
+	    me undoablePaste:text
+	]
     ]
 !
 
@@ -6896,42 +6896,42 @@
     s := someText.
     codingErrorReported := false.
     CharacterEncoderError handle:[:ex |
-        |code msg|
-
-        code := ex parameter.
-        codingErrorReported ifFalse:[
-            msg := 'Cannot represent pasted string in this Views encoding (',gc characterEncoding,').'.
-            code notNil ifTrue:[
-                msg := msg , '\\Reason: No representation for ' , (code radixPrintStringRadix:16).
-            ].
-            Dialog warn:(resources stringWithCRs:msg).
-            codingErrorReported := true.
-        ].
-        ex proceedWith:ex defaultValue
+	|code msg|
+
+	code := ex parameter.
+	codingErrorReported ifFalse:[
+	    msg := 'Cannot represent pasted string in this Views encoding (',gc characterEncoding,').'.
+	    code notNil ifTrue:[
+		msg := msg , '\\Reason: No representation for ' , (code radixPrintStringRadix:16).
+	    ].
+	    Dialog warn:(resources stringWithCRs:msg).
+	    codingErrorReported := true.
+	].
+	ex proceedWith:ex defaultValue
     ] do:[
-        s isString ifTrue:[
-            s encoding ~~ gc characterEncoding ifTrue:[
-                s := s encodeFrom:(s encoding) into:gc characterEncoding.
-            ].
-
-            s := s asStringCollection.
-            (someText endsWith:Character cr) ifTrue:[
-                "/ s := s copyWith:nil.
-                s := s copyWith:'' "/ an empty line at the end
-
-            ]
-        ] ifFalse:[
-            s isStringCollection ifTrue:[
-                s := s encodeFrom:(s encoding) into:gc characterEncoding.
-            ] ifFalse:[
-                (self
-                    confirm:(resources
-                        stringWithCRs:'Selection (%1) is not convertable to Text.\\Paste storeString ?'
-                        with:s class name)) ifFalse:[^ self].
-                s := StringCollection with:s storeString .
-                "/ ^ self
-            ].
-        ].
+	s isString ifTrue:[
+	    s encoding ~~ gc characterEncoding ifTrue:[
+		s := s encodeFrom:(s encoding) into:gc characterEncoding.
+	    ].
+
+	    s := s asStringCollection.
+	    (someText endsWith:Character cr) ifTrue:[
+		"/ s := s copyWith:nil.
+		s := s copyWith:'' "/ an empty line at the end
+
+	    ]
+	] ifFalse:[
+	    s isStringCollection ifTrue:[
+		s := s encodeFrom:(s encoding) into:gc characterEncoding.
+	    ] ifFalse:[
+		(self
+		    confirm:(resources
+			stringWithCRs:'Selection (%1) is not convertable to Text.\\Paste storeString ?'
+			with:s class name)) ifFalse:[^ self].
+		s := StringCollection with:s storeString .
+		"/ ^ self
+	    ].
+	].
     ].
 
     (nLines := s size) == 0 ifTrue:[^ self].
@@ -6942,15 +6942,15 @@
     startLine := l1 := cursorLine.
     startCol := c1 := cursorCol.
 
-    "do not autoindent here. 
-     It does make things very ugly, in the inspector 
+    "do not autoindent here.
+     It does make things very ugly, in the inspector
      (try inspecting a multiline string)..."
     self withAutoIndent:false do:[
-        "do not expand tabs into spaces here -
-         they get expanded in basicWithoutRedrawInsertStringWithoutCRs:aString atLine:lineNr col:colNr.
-         Some Subviews want to paste with unexpanded tabs!!"
-
-        self insertLines:s withCR:withCR.
+	"do not expand tabs into spaces here -
+	 they get expanded in basicWithoutRedrawInsertStringWithoutCRs:aString atLine:lineNr col:colNr.
+	 Some Subviews want to paste with unexpanded tabs!!"
+
+	self insertLines:s withCR:withCR.
     ].
     l2 := cursorLine.
     c2 := (cursorCol - 1).
@@ -6968,8 +6968,8 @@
 
     typeOfSelection := nil.
     self
-        undoableDo:[ self pasteOrReplace:(self getClipboardText asString string storeString) ]
-        info:'Paste as String Literal'
+	undoableDo:[ self pasteOrReplace:(self getClipboardText asString string storeString) ]
+	info:'Paste as String Literal'
 !
 
 pasteOrReplace
@@ -6990,11 +6990,11 @@
     self checkModificationsAllowed ifFalse:[^ self].
 
     self undoableDo:[
-        ((self hasSelection == true) and:[typeOfSelection ~~ #paste]) ifTrue:[
-            self replace:someText
-        ] ifFalse:[
-            self paste:someText.
-        ]
+	((self hasSelection == true) and:[typeOfSelection ~~ #paste]) ifTrue:[
+	    self replace:someText
+	] ifFalse:[
+	    self paste:someText.
+	]
     ] info:'Paste/Replace'.
 
     "Modified: / 30.1.2000 / 02:33:00 / cg"
@@ -7007,12 +7007,12 @@
     |text|
 
     self checkModificationsAllowed ifFalse:[
-        self flashReadOnly.
-        ^ self
+	self flashReadOnly.
+	^ self
     ].
     text := self getClipboardText:#clipboard.
     text notNil ifTrue:[
-        self pasteOrReplace:text
+	self pasteOrReplace:text
     ]
 !
 
@@ -7023,12 +7023,12 @@
     |text|
 
     self checkModificationsAllowed ifFalse:[
-        self flashReadOnly.
-        ^ self
+	self flashReadOnly.
+	^ self
     ].
     text := self getTextSelectionFromHistory.
     text notNil ifTrue:[
-        self pasteOrReplace:text
+	self pasteOrReplace:text
     ]
 !
 
@@ -7039,8 +7039,8 @@
     self checkModificationsAllowed ifFalse:[^ self].
 
     self withSelfAndTextForPasteDo:[:me :text |
-        me undoableDo:[ me replace:text ]
-        info:'Replace'
+	me undoableDo:[ me replace:text ]
+	info:'Replace'
     ]
 !
 
@@ -7053,75 +7053,75 @@
     self checkModificationsAllowed ifFalse:[^ self].
 
     self undoableDo:[
-        selected := self selection.
-        selected isNil ifTrue:[
-            ^ self paste:someText
-        ].
-
-        self deleteSelection.
-
-        "take care, if we replace a selection without space by a word selected
-         with one - in this case we usually do not want the space.
-         But, if we replace a word-selected selection by something without a
-         space, we DO want the space added."
-
-        selected size == 1 ifTrue:[
-            selectedString := selected at:1.
-        ].
-
-        someText size == 1 ifTrue:[
-            |cutOffSpace addSpace replacement replacementString|
-
-            cutOffSpace := false.
-            addSpace := false.
-            replacement := someText copyFrom:1.
-
-            selectedString notNil ifTrue:[
-                ((selectedString startsWith:' ') or:[selectedString endsWith:' ']) ifFalse:[
-                   "selection has no space"
-
-                    ((selectStyle == #wordleft) or:[selectStyle == #wordRight]) ifTrue:[
-                        cutOffSpace := true
-                    ]
-                ] ifTrue:[
-                    addSpace := true
-                ]
-            ].
-            replacementString := replacement at:1.
-            cutOffSpace ifTrue:[
-                (replacementString startsWith:' ') ifTrue:[
-                    replacementString := replacementString withoutSpaces
-                ].
-            ] ifFalse:[
-                selectStyle == #wordLeft ifTrue:[
-                    "want a space at left"
-                    (replacementString startsWith:' ') ifFalse:[
-                        replacementString := replacementString withoutSpaces.
-                        replacementString := ' ' , replacementString
-                    ]
-                ].
-                selectStyle == #wordRight ifTrue:[
-                    "want a space at right"
-
-                    (replacementString endsWith:' ') ifFalse:[
-                        replacementString := replacementString withoutSpaces.
-                        replacementString := replacementString , ' '
-                    ]
-                ].
-            ].
-            replacement at:1 put: replacementString.
-            self paste:replacement.
-        ] ifFalse:[
-            self paste:someText
-        ].
-        self setLastStringToReplace: selectedString.
-
-        lastReplacementInfo lastReplacement: someText.
-
-        selStartLine := selectionStartLine.
-        selStartCol := self selectionStartCol.
-        selEndLine := selectionEndLine.
-        selEndCol := self selectionEndCol.
+	selected := self selection.
+	selected isNil ifTrue:[
+	    ^ self paste:someText
+	].
+
+	self deleteSelection.
+
+	"take care, if we replace a selection without space by a word selected
+	 with one - in this case we usually do not want the space.
+	 But, if we replace a word-selected selection by something without a
+	 space, we DO want the space added."
+
+	selected size == 1 ifTrue:[
+	    selectedString := selected at:1.
+	].
+
+	someText size == 1 ifTrue:[
+	    |cutOffSpace addSpace replacement replacementString|
+
+	    cutOffSpace := false.
+	    addSpace := false.
+	    replacement := someText copyFrom:1.
+
+	    selectedString notNil ifTrue:[
+		((selectedString startsWith:' ') or:[selectedString endsWith:' ']) ifFalse:[
+		   "selection has no space"
+
+		    ((selectStyle == #wordleft) or:[selectStyle == #wordRight]) ifTrue:[
+			cutOffSpace := true
+		    ]
+		] ifTrue:[
+		    addSpace := true
+		]
+	    ].
+	    replacementString := replacement at:1.
+	    cutOffSpace ifTrue:[
+		(replacementString startsWith:' ') ifTrue:[
+		    replacementString := replacementString withoutSpaces
+		].
+	    ] ifFalse:[
+		selectStyle == #wordLeft ifTrue:[
+		    "want a space at left"
+		    (replacementString startsWith:' ') ifFalse:[
+			replacementString := replacementString withoutSpaces.
+			replacementString := ' ' , replacementString
+		    ]
+		].
+		selectStyle == #wordRight ifTrue:[
+		    "want a space at right"
+
+		    (replacementString endsWith:' ') ifFalse:[
+			replacementString := replacementString withoutSpaces.
+			replacementString := replacementString , ' '
+		    ]
+		].
+	    ].
+	    replacement at:1 put: replacementString.
+	    self paste:replacement.
+	] ifFalse:[
+	    self paste:someText
+	].
+	self setLastStringToReplace: selectedString.
+
+	lastReplacementInfo lastReplacement: someText.
+
+	selStartLine := selectionStartLine.
+	selStartCol := self selectionStartCol.
+	selEndLine := selectionEndLine.
+	selEndCol := self selectionEndCol.
     ]
     info:'Replace'
 
@@ -7143,75 +7143,75 @@
     patternHolder := ValueHolder with:''.
     replacePatternHolder := ValueHolder with:''.
     lastSearchPattern notNil ifTrue:[
-        initialString := lastSearchPattern
+	initialString := lastSearchPattern
     ].
     self hasSelectionWithinSingleLine ifTrue:[
-        initialString := self selectionAsString
+	initialString := self selectionAsString
     ].
     initialString isNil ifTrue:[
-        LastSearchPatterns size > 0 ifTrue:[
-            initialString := LastSearchPatterns first
-        ]
+	LastSearchPatterns size > 0 ifTrue:[
+	    initialString := LastSearchPatterns first
+	]
     ].
     initialString notNil ifTrue:[
-        patternHolder value:initialString.
-        replacePatternHolder value:initialString.
+	patternHolder value:initialString.
+	replacePatternHolder value:initialString.
     ].
     flag := true.
     search := [:fwd |
-            self
-                search:patternHolder value
-                ignoreCase:caseHolder value
-                forward:fwd.
-        ].
+	    self
+		search:patternHolder value
+		ignoreCase:caseHolder value
+		forward:fwd.
+	].
     replace := [:all |
-            self
-                replace:patternHolder value
-                by:replacePatternHolder value
-                all:all
-                ignoreCase:caseHolder value
-        ].
+	    self
+		replace:patternHolder value
+		by:replacePatternHolder value
+		all:all
+		ignoreCase:caseHolder value
+	].
     bindings := IdentityDictionary new.
     bindings at:#searchPattern put:patternHolder.
     bindings at:#replacePattern put:replacePatternHolder.
     modal ifTrue:[
-        bindings at:#nextAction
-            put:[
-                flag := true.
-                action := search.
-                searchBox doAccept.
-            ].
-        bindings at:#prevAction
-            put:[
-                flag := false.
-                action := search.
-                searchBox doAccept.
-            ].
-        bindings at:#replaceAction
-            put:[
-                flag := false.
-                action := replace.
-                searchBox doAccept.
-            ].
-        bindings at:#replaceAllAction
-            put:[
-                flag := true.
-                action := replace.
-                searchBox doAccept.
-            ].
+	bindings at:#nextAction
+	    put:[
+		flag := true.
+		action := search.
+		searchBox doAccept.
+	    ].
+	bindings at:#prevAction
+	    put:[
+		flag := false.
+		action := search.
+		searchBox doAccept.
+	    ].
+	bindings at:#replaceAction
+	    put:[
+		flag := false.
+		action := replace.
+		searchBox doAccept.
+	    ].
+	bindings at:#replaceAllAction
+	    put:[
+		flag := true.
+		action := replace.
+		searchBox doAccept.
+	    ].
     ] ifFalse:[
-        bindings at:#nextAction put:[ search value:true. ].
-        bindings at:#prevAction put:[ search value:false. ].
-        bindings at:#replaceAction put:[ replace value:false. ].
-        bindings at:#replaceAllAction put:[ replace value:true. ].
+	bindings at:#nextAction put:[ search value:true. ].
+	bindings at:#prevAction put:[ search value:false. ].
+	bindings at:#replaceAction put:[ replace value:false. ].
+	bindings at:#replaceAllAction put:[ replace value:true. ].
     ].
     bindings at:#ignoreCase put:caseHolder.
     bindings at:#patternList put:LastSearchPatterns.
     modal ifTrue:[
-        searchBox := SimpleDialog new.
+	searchBox := SimpleDialog new.
     ] ifFalse:[
-        searchBox := ApplicationModel new.
-        searchBox createBuilder.
+	searchBox := ApplicationModel new.
+	searchBox createBuilder.
     ].
     searchBox resources:(self resources).
     bldr := searchBox builder.
@@ -7221,26 +7221,26 @@
     (bldr componentAt:#prevButton) cursor:(Cursor thumbsUp).
     (bldr componentAt:#cancelButton) cursor:(Cursor thumbsDown).
     modal ifTrue:[
-        searchBox openDialog.
-        searchBox accepted ifTrue:[
-            action value:flag
-        ].
+	searchBox openDialog.
+	searchBox accepted ifTrue:[
+	    action value:flag
+	].
     ] ifFalse:[
-        (bldr componentAt:#nextButton) isReturnButton:false.
-        (bldr componentAt:#cancelButton)
-            label:(resources string:'Close');
-            action:[ searchBox closeRequest ].
-
-        "/ searchBox masterApplication:self application.
-
-        self topView beMaster.
-        (searchBox window)
-            beSlave;
-            openInGroup:(self windowGroup).
-
-        "/ searchBox window open.
-
-        searchBox window assignKeyboardFocusToFirstKeyboardConsumer.
+	(bldr componentAt:#nextButton) isReturnButton:false.
+	(bldr componentAt:#cancelButton)
+	    label:(resources string:'Close');
+	    action:[ searchBox closeRequest ].
+
+	"/ searchBox masterApplication:self application.
+
+	self topView beMaster.
+	(searchBox window)
+	    beSlave;
+	    openInGroup:(self windowGroup).
+
+	"/ searchBox window open.
+
+	searchBox window assignKeyboardFocusToFirstKeyboardConsumer.
     ]
 
     "Modified: / 11-07-2006 / 11:20:06 / fm"
@@ -7259,14 +7259,14 @@
 sort:how ignoreCase:ignoreCase fromLine:start toLine:end
     "sort/reorder the selected lines.
      how:
-        #lines
-        #linesByFirstWord
-        #linesByNthWord
-        #linesByNthNumber
-        #linesByNthHexNumber
-        #words
-        #linesByLength
-        #reverse
+	#lines
+	#linesByFirstWord
+	#linesByNthWord
+	#linesByNthNumber
+	#linesByNthHexNumber
+	#words
+	#linesByLength
+	#reverse
     "
 
     |lines extractor innerExtractor fetcher operation lineWise nStr n s words|
@@ -7274,75 +7274,75 @@
     lineWise := true.
 
     how == #reverse ifTrue:[
-        operation := [:lines | lines reverse].
+	operation := [:lines | lines reverse].
     ] ifFalse:[
-        operation := [:linesOrWords |
-                        linesOrWords sort:[:item1 :item2 | (fetcher value:item1) < (fetcher value:item2)]
-                     ].
-
-        how == #linesByLength ifTrue:[
-            fetcher := [:l | l size].
-        ] ifFalse:[
-            how == #lines ifTrue:[
-                extractor := [:l | l withoutLeadingSeparators].
-            ] ifFalse:[ 
-                how == #linesByFirstWord ifTrue:[
-                    extractor := [:l | ((l asCollectionOfWords select:[:w | w isEmpty or:[w first isLetterOrDigit]]) at:1 ifAbsent:'')].
-                ] ifFalse:[ 
-                    ((how == #linesByNthWord) or:[ how == #linesByNthNumber  or:[ how == #linesByNthHexNumber]]) ifTrue:[
-                        nStr := Dialog request:'Word/Column (1..)' initialAnswer:(LastColumnNumberForSort ? 2).
-                        nStr isEmptyOrNil ifTrue:[^ self].
-                        n := Integer readFrom:nStr onError:[^ self].
-                        LastColumnNumberForSort := n.
-                        extractor := [:l | ((l string asCollectionOfWords) at:n ifAbsent:'')].
-                        how == #linesByNthNumber ifTrue:[
-                            innerExtractor := extractor.
-                            extractor := [:l | Integer readFrom:(innerExtractor value:l) onError:0]
-                        ] ifFalse:[
-                            how == #linesByNthHexNumber ifTrue:[
-                                innerExtractor := extractor.
-                                extractor := [:l | 
-                                    |s|                                 
-                                    s := innerExtractor value:l.
-                                    (s startsWith:'16r') ifTrue:[
-                                        (Integer readSmalltalkSyntaxFrom:s) ? 0
-                                    ] ifFalse:[
-                                        Integer readFrom:s radix:16 onError:[ 0 ]
-                                    ]
-                                ]
-                            ]
-                        ].
-                    ] ifFalse:[ 
-                        how == #words ifTrue:[
-                            lineWise := false.
-                            extractor := [:w | w].
-                        ] ifFalse:[
-                            self error:'unknown sort criteria: ', how printString.
-                        ]
-                    ]
-                ]
-            ].
-            ignoreCase ifTrue:[
-                fetcher := [:l | (extractor value:l) asLowercase].
-            ] ifFalse:[
-                fetcher := extractor.
-            ].
-        ].
+	operation := [:linesOrWords |
+			linesOrWords sort:[:item1 :item2 | (fetcher value:item1) < (fetcher value:item2)]
+		     ].
+
+	how == #linesByLength ifTrue:[
+	    fetcher := [:l | l size].
+	] ifFalse:[
+	    how == #lines ifTrue:[
+		extractor := [:l | l withoutLeadingSeparators].
+	    ] ifFalse:[
+		how == #linesByFirstWord ifTrue:[
+		    extractor := [:l | ((l asCollectionOfWords select:[:w | w isEmpty or:[w first isLetterOrDigit]]) at:1 ifAbsent:'')].
+		] ifFalse:[
+		    ((how == #linesByNthWord) or:[ how == #linesByNthNumber  or:[ how == #linesByNthHexNumber]]) ifTrue:[
+			nStr := Dialog request:'Word/Column (1..)' initialAnswer:(LastColumnNumberForSort ? 2).
+			nStr isEmptyOrNil ifTrue:[^ self].
+			n := Integer readFrom:nStr onError:[^ self].
+			LastColumnNumberForSort := n.
+			extractor := [:l | ((l string asCollectionOfWords) at:n ifAbsent:'')].
+			how == #linesByNthNumber ifTrue:[
+			    innerExtractor := extractor.
+			    extractor := [:l | Integer readFrom:(innerExtractor value:l) onError:0]
+			] ifFalse:[
+			    how == #linesByNthHexNumber ifTrue:[
+				innerExtractor := extractor.
+				extractor := [:l |
+				    |s|
+				    s := innerExtractor value:l.
+				    (s startsWith:'16r') ifTrue:[
+					(Integer readSmalltalkSyntaxFrom:s) ? 0
+				    ] ifFalse:[
+					Integer readFrom:s radix:16 onError:[ 0 ]
+				    ]
+				]
+			    ]
+			].
+		    ] ifFalse:[
+			how == #words ifTrue:[
+			    lineWise := false.
+			    extractor := [:w | w].
+			] ifFalse:[
+			    self error:'unknown sort criteria: ', how printString.
+			]
+		    ]
+		]
+	    ].
+	    ignoreCase ifTrue:[
+		fetcher := [:l | (extractor value:l) asLowercase].
+	    ] ifFalse:[
+		fetcher := extractor.
+	    ].
+	].
     ].
 
     lineWise ifTrue:[
-        "process the lines of the selection (aka a collection of lines)"
-        start == end ifTrue:[^ self ].
-        lines := (start to:end) collect:[:lineNr | (self listAt:lineNr) ? ''].
-        lines := operation value:lines.
-        (start to:end) with:lines do:[:lineNr :line | self replaceLine:lineNr with:line].
+	"process the lines of the selection (aka a collection of lines)"
+	start == end ifTrue:[^ self ].
+	lines := (start to:end) collect:[:lineNr | (self listAt:lineNr) ? ''].
+	lines := operation value:lines.
+	(start to:end) with:lines do:[:lineNr :line | self replaceLine:lineNr with:line].
     ] ifFalse:[
-        "process the whole selection as a string"
-        s := self selectionAsString.
-        words := s asCollectionOfWords.
-        words := operation value:words.
-        s := words asStringCollection asStringWith:Character space.
-        self replace:s.
+	"process the whole selection as a string"
+	s := self selectionAsString.
+	words := s asCollectionOfWords.
+	words := operation value:words.
+	s := words asStringCollection asStringWith:Character space.
+	self replace:s.
     ].
     self textChanged.
 
@@ -7359,23 +7359,23 @@
     start := selectionStartLine.
     end := selectionEndLine.
     (selectionEndCol == 0) ifTrue:[
-        end := end - 1
+	end := end - 1
     ].
 
     self
-        undoableDo:[ 
-            self sort:how ignoreCase:ignoreCase fromLine:start toLine:end 
-        ]
-        info:'Sort'
+	undoableDo:[
+	    self sort:how ignoreCase:ignoreCase fromLine:start toLine:end
+	]
+	info:'Sort'
 
     "Modified (format): / 15-02-2012 / 16:52:53 / cg"
 !
 
 specialCharacters
     CharacterSetView
-        openAsInputFor:self
-        label:'Special Character Input'
-        clickLabel:'Click to Insert Character'.
+	openAsInputFor:self
+	label:'Special Character Input'
+	clickLabel:'Click to Insert Character'.
 !
 
 splitLinesAtCharacterOrString
@@ -7392,14 +7392,14 @@
     in := sel readStream.
     out := CharacterWriteStream on:(String new).
     [in atEnd] whileFalse:[
-        record := in throughAll:separator.
-        out nextPutLine:record.
+	record := in throughAll:separator.
+	out nextPutLine:record.
     ].
     self
-        undoableDo:[ 
-            self replaceSelectionBy:(out contents).
-        ]
-        info:'Split Selection'
+	undoableDo:[
+	    self replaceSelectionBy:(out contents).
+	]
+	info:'Split Selection'
 !
 
 undoablePaste:someText
@@ -7410,31 +7410,31 @@
 
 undoablePaste:someText info:infoOrNil
     self
-        undoableDo:[
-            self paste:someText.
-        ]
-        info:infoOrNil
+	undoableDo:[
+	    self paste:someText.
+	]
+	info:infoOrNil
 
     "Created: / 28-07-2007 / 13:25:30 / cg"
 !
 
 undoablePasteOrReplace:someText info:infoOrNil
     self
-        undoableDo:[
-            self pasteOrReplace:someText.
-        ]
-        info:infoOrNil
+	undoableDo:[
+	    self pasteOrReplace:someText.
+	]
+	info:infoOrNil
 
     "Created: / 28-07-2007 / 13:26:16 / cg"
 !
 
 undoablePasteReplacingAll:someText info:infoOrNil
     self
-        undoableDo:[
-            self selectAll.
-            self pasteOrReplace:someText.
-        ]
-        info:infoOrNil
+	undoableDo:[
+	    self selectAll.
+	    self pasteOrReplace:someText.
+	]
+	info:infoOrNil
 
     "Created: / 28-07-2007 / 13:25:30 / cg"
 !
@@ -7445,13 +7445,13 @@
     |sel|
 
     self checkModificationsAllowed ifFalse:[
-        self flashReadOnly.
-        ^ self
+	self flashReadOnly.
+	^ self
     ].
 
     sel := self getTextSelectionOrTextSelectionFromHistory.
     sel notNil ifTrue:[
-        aBlock value:self value:sel.
+	aBlock value:self value:sel.
     ]
 ! !
 
@@ -7460,8 +7460,8 @@
 beep
     "output an audible beep or bell on my screen device"
 
-    UserPreferences current beepInEditor ifTrue:[                
-        super beep
+    UserPreferences current beepInEditor ifTrue:[
+	super beep
     ]
 !
 
@@ -7472,13 +7472,13 @@
      and may show a warnBox or whatever."
 
     self isReadOnly ifTrue: [
-        exceptionBlock isNil ifTrue:[
-            ^ false
-        ].
-
-        (exceptionBlock value:'Text may not be modified') ~~ true ifTrue:[
-            ^ false
-        ]
+	exceptionBlock isNil ifTrue:[
+	    ^ false
+	].
+
+	(exceptionBlock value:'Text may not be modified') ~~ true ifTrue:[
+	    ^ false
+	]
     ].
     ^ true
 
@@ -7487,9 +7487,9 @@
 
 currentSelectionBgColor
     typeOfSelection == #paste ifTrue:[
-        ^ DefaultAlternativeSelectionBackgroundColor ? selectionBgColor
-    ].
-    "/ hasKeyboardFocus ifFalse:[^ Color lightGrey]. 
+	^ DefaultAlternativeSelectionBackgroundColor ? selectionBgColor
+    ].
+    "/ hasKeyboardFocus ifFalse:[^ Color lightGrey].
     ^ super currentSelectionBgColor
 
     "
@@ -7499,7 +7499,7 @@
 
 currentSelectionFgColor
     typeOfSelection == #paste ifTrue:[
-        ^ DefaultAlternativeSelectionForegroundColor ? selectionFgColor
+	^ DefaultAlternativeSelectionForegroundColor ? selectionFgColor
     ].
     ^ super currentSelectionFgColor
 !
@@ -7528,9 +7528,9 @@
     lastStringFromReplaceForNextSearch := aString.
 
     "If the replace came after a search, the next replace will have the ignored case from that search action"
-    lastReplaceIgnoredCase := (typeOfSelection == #search) 
-                                ifTrue: [lastSearchIgnoredCase] 
-                                ifFalse: [nil].
+    lastReplaceIgnoredCase := (typeOfSelection == #search)
+				ifTrue: [lastSearchIgnoredCase]
+				ifFalse: [nil].
     lastReplacementInfo lastReplaceIgnoredCase: lastReplaceIgnoredCase.
 !
 
@@ -7553,7 +7553,7 @@
      contentsChanged, which is triggered when the size has changed, and
      is used to notify scrollers, other views etc.).
 
-     As some authors of this code have been very sloppy in tha past 
+     As some authors of this code have been very sloppy in tha past
      (not sending contentsChanged, but textChanged),
      we do it here despite what is written above, to ensure that scrollers update correctly."
 
@@ -7654,8 +7654,8 @@
 
     w := super widthOfContents.
     (dev := device ) isNil ifTrue:[
-        "/ really don't know ...
-        dev := Screen current
+	"/ really don't know ...
+	dev := Screen current
     ].
     ^ w + (gc font widthOn:dev)
 
@@ -7683,11 +7683,11 @@
     "redraw the cursor, if it sits in a line range"
 
     cursorShown ifTrue:[
-        cursorVisibleLine notNil ifTrue:[
-            (cursorVisibleLine between:startVisLine and:endVisLine) ifTrue:[
-                self drawCursorCharacter
-            ]
-        ]
+	cursorVisibleLine notNil ifTrue:[
+	    (cursorVisibleLine between:startVisLine and:endVisLine) ifTrue:[
+		self drawCursorCharacter
+	    ]
+	]
     ]
 !
 
@@ -7695,9 +7695,9 @@
     "redraw the cursor, if it sits in visible line"
 
     cursorShown ifTrue:[
-        (visLine == cursorVisibleLine) ifTrue:[
-            self drawCursorCharacter
-        ]
+	(visLine == cursorVisibleLine) ifTrue:[
+	    self drawCursorCharacter
+	]
     ]
 !
 
@@ -7720,12 +7720,12 @@
 
     super redrawVisibleLine:visLine col:colNr.
     cursorShown ifTrue:[
-        (visLine == cursorVisibleLine) ifTrue:[
-            (colNr == cursorCol) ifTrue:[
-                self drawCursorCharacter.
-                ^ self
-            ]
-        ]
+	(visLine == cursorVisibleLine) ifTrue:[
+	    (colNr == cursorCol) ifTrue:[
+		self drawCursorCharacter.
+		^ self
+	    ]
+	]
     ].
 
     "Modified: / 05-11-2007 / 17:35:53 / cg"
@@ -7736,7 +7736,7 @@
 
     super redrawVisibleLine:visLine from:startCol.
     cursorShown ifTrue:[
-        self redrawCursorIfInVisibleLine:visLine
+	self redrawCursorIfInVisibleLine:visLine
     ]
 !
 
@@ -7790,7 +7790,7 @@
     "
     self updateCursorVisibleLine.
     prevCursorState ifTrue:[
-        self showCursor
+	self showCursor
     ]
 
     "Modified: / 17.6.1998 / 16:13:24 / cg"
@@ -7802,7 +7802,7 @@
     prevCursorState := cursorShown.
     "/ cursorShown := false.
     cursorShown ifTrue:[
-        self hideCursor
+	self hideCursor
     ]
 
     "Modified: / 6.7.1998 / 13:07:23 / cg"
@@ -7851,17 +7851,17 @@
     cursorLine isNil ifTrue:[^ self].
 
     self
-        searchBackwardFor:pattern
-        ignoreCase:ign
-        startingAtLine:startLine col:startCol
-        ifFound:[:line :col :endColOrNil |
-            self cursorMovementAllowed ifTrue:[
-                self cursorLine:line col:col.
-            ].
-            self showMatch:pattern isMatch:false atLine:line col:col endCol:endColOrNil.
+	searchBackwardFor:pattern
+	ignoreCase:ign
+	startingAtLine:startLine col:startCol
+	ifFound:[:line :col :endColOrNil |
+	    self cursorMovementAllowed ifTrue:[
+		self cursorLine:line col:col.
+	    ].
+	    self showMatch:pattern isMatch:false atLine:line col:col endCol:endColOrNil.
 "/            self makeLineVisible:cursorLine
-            typeOfSelection := #search]
-        ifAbsent:aBlock
+	    typeOfSelection := #search]
+	ifAbsent:aBlock
 
     "Modified: 9.10.1997 / 13:02:13 / cg"
 !
@@ -7881,10 +7881,10 @@
     self cursorMovementAllowed ifFalse:[^ self].
 
     self
-        searchForMatchingParenthesisFromLine:cursorLine col:cursorCol
-        ifFound:[:line :col | self cursorLine:line col:col]
-        ifNotFound:[self showNotFound]
-        onError:[self beep]
+	searchForMatchingParenthesisFromLine:cursorLine col:cursorCol
+	ifFound:[:line :col | self cursorLine:line col:col]
+	ifNotFound:[self showNotFound]
+	onError:[self beep]
 
     "Modified: 9.10.1997 / 12:56:30 / cg"
 !
@@ -7893,20 +7893,20 @@
     "do a forward search"
 
     cursorLine isNil ifTrue:[^ self].
-    self 
-        searchForwardFor:pattern 
-        ignoreCase:ign
-        match: match
-        startingAtLine:startLine col:startCol
-        ifFound:[:line :col :endColOrNil|
-            self cursorMovementAllowed ifTrue:[
-                self cursorLine:line col:col.
-            ].
-            self showMatch:pattern isMatch:match atLine:line col:col endCol:endColOrNil.
+    self
+	searchForwardFor:pattern
+	ignoreCase:ign
+	match: match
+	startingAtLine:startLine col:startCol
+	ifFound:[:line :col :endColOrNil|
+	    self cursorMovementAllowed ifTrue:[
+		self cursorLine:line col:col.
+	    ].
+	    self showMatch:pattern isMatch:match atLine:line col:col endCol:endColOrNil.
 "/            self makeLineVisible:cursorLine
-            typeOfSelection := #search
-        ]
-        ifAbsent:aBlock
+	    typeOfSelection := #search
+	]
+	ifAbsent:aBlock
 
     "Modified: 9.10.1997 / 12:57:47 / cg"
     "Created: 9.10.1997 / 13:01:12 / cg"
@@ -7931,9 +7931,9 @@
     |searchPattern|
 
     searchPattern := self searchPatternFromUserSelectionOrReplace.
-    searchPattern isNil 
-        ifTrue: [searchPattern := lastSearchPattern]
-        ifFalse: [lastSearchPattern := searchPattern].
+    searchPattern isNil
+	ifTrue: [searchPattern := lastSearchPattern]
+	ifFalse: [lastSearchPattern := searchPattern].
     ^ searchPattern
 !
 
@@ -7967,13 +7967,13 @@
     "/
     sel := self selection.
     sel notNil ifTrue:[
-        (lastSearchPattern isNil
-        or:[typeOfSelection ~~ #paste and:[typeOfSelection ~~ #search]]
-        ) ifTrue:[
-            self cursorLine:selectionStartLine col:selectionStartCol.
-            lastSearchPattern := sel asStringWithoutFinalCR.
-            match ifTrue:[lastSearchPattern := lastSearchPattern withMatchEscapes].
-        ]
+	(lastSearchPattern isNil
+	or:[typeOfSelection ~~ #paste and:[typeOfSelection ~~ #search]]
+	) ifTrue:[
+	    self cursorLine:selectionStartLine col:selectionStartCol.
+	    lastSearchPattern := sel asStringWithoutFinalCR.
+	    match ifTrue:[lastSearchPattern := lastSearchPattern withMatchEscapes].
+	]
     ]
 
     "Modified: / 07-05-2011 / 17:25:59 / cg"
@@ -7992,16 +7992,16 @@
     |startLine startCol|
 
     selectionStartLine notNil ifTrue:[
-        startLine := selectionStartLine.
-        startCol := selectionStartCol
+	startLine := selectionStartLine.
+	startCol := selectionStartCol
     ] ifFalse:[
-        cursorLine isNil ifTrue:[
-            startLine := list size.
-            startCol := self listAt:startLine size.
-        ] ifFalse:[
-            startLine := cursorLine min:list size.
-            startCol := cursorCol
-        ]
+	cursorLine isNil ifTrue:[
+	    startLine := list size.
+	    startCol := self listAt:startLine size.
+	] ifFalse:[
+	    startLine := cursorLine min:list size.
+	    startCol := cursorCol
+	]
     ].
 
     ^ startCol @ cursorLine
@@ -8018,12 +8018,12 @@
     "/ assume its the first search and do not skip the very first match
     startCol := cursorCol.
     self hasSelection ifTrue:[
-        ^ selectionEndCol @ selectionEndLine.
+	^ selectionEndCol @ selectionEndLine.
     ] ifFalse:[
-        (cursorLine == 1 and:[cursorCol == 1]) ifTrue:[
-            startCol := 0
-        ].
-        startCol := startCol min:(self at:cursorLine) size
+	(cursorLine == 1 and:[cursorCol == 1]) ifTrue:[
+	    startCol := 0
+	].
+	startCol := startCol min:(self at:cursorLine) size
     ].
 
     ^ startCol @ cursorLine
@@ -8039,19 +8039,19 @@
     "evaluate aBlock while unselected.
      Restore the previous selection afterwards.
      CG: I am not sure, if this is a leftover and is still used at all.
-         It is therefore temporarily marked as obsolete. Please check
-         and let me know."
+	 It is therefore temporarily marked as obsolete. Please check
+	 and let me know."
 
     |startLine startCol endLine endCol |
 
     self hasSelection ifTrue: [
-        startLine := selectionStartLine .
-        startCol := selectionStartCol .
-        endLine := selectionEndLine .
-        endCol := selectionEndCol .
+	startLine := selectionStartLine .
+	startCol := selectionStartCol .
+	endLine := selectionEndLine .
+	endCol := selectionEndCol .
     ] ifFalse: [
-        startLine := endLine :=  cursorLine .
-        startCol := endCol := cursorCol .
+	startLine := endLine :=  cursorLine .
+	startCol := endCol := cursorCol .
     ].
 
     "deselectim a provedu presun kurzoru..."
@@ -8060,11 +8060,11 @@
 
     "funguje dost mizerne, jen na jednom radku..."
     (startCol - cursorCol) abs <= (endCol - cursorCol) abs
-        ifTrue: [
-            startCol := cursorCol.
-        ] ifFalse: [
-            endCol := cursorCol - 1.
-        ].
+	ifTrue: [
+	    startCol := cursorCol.
+	] ifFalse: [
+	    endCol := cursorCol - 1.
+	].
     self selectFromLine:startLine col:startCol toLine: endLine col:endCol .
 !
 
@@ -8079,12 +8079,12 @@
 
 changeTypeOfSelectionTo:newType
     typeOfSelection ~~ newType ifTrue:[
-        typeOfSelection := newType.
-        selectionStartLine notNil ifTrue:[
-            self
-                redrawFromLine:selectionStartLine col:selectionStartCol
-                toLine:selectionEndLine col:selectionEndCol
-        ].
+	typeOfSelection := newType.
+	selectionStartLine notNil ifTrue:[
+	    self
+		redrawFromLine:selectionStartLine col:selectionStartCol
+		toLine:selectionEndLine col:selectionEndCol
+	].
     ].
 !
 
@@ -8092,8 +8092,8 @@
     |selStartCol selStartLine selEndCol selEndLine|
 
     selectionStartCol isNil ifTrue:[
-        self selectWordUnderCursor.
-        ^ self
+	self selectWordUnderCursor.
+	^ self
     ].
 
     selStartCol := selectionStartCol.
@@ -8117,12 +8117,12 @@
     "/
     (lastStringFromReplaceForNextSearch notNil
      and:[typeOfSelection ~~ #search]) ifTrue:[
-        lastStringFromReplaceForNextSearch isString ifTrue:[
-            searchPattern := lastStringFromReplaceForNextSearch.
-        ] ifFalse:[
-            searchPattern := lastStringFromReplaceForNextSearch asStringWithoutFinalCR.
-        ].
-        ^ searchPattern
+	lastStringFromReplaceForNextSearch isString ifTrue:[
+	    searchPattern := lastStringFromReplaceForNextSearch.
+	] ifFalse:[
+	    searchPattern := lastStringFromReplaceForNextSearch asStringWithoutFinalCR.
+	].
+	^ searchPattern
     ].
 
     "/
@@ -8134,12 +8134,12 @@
     "/
     sel := self selection.
     sel notNil ifTrue:[
-        typeOfSelection ~~ #search ifTrue:[
-            typeOfSelection ~~ #paste ifTrue:[
-                self cursorLine:selectionStartLine col:selectionStartCol.
-                searchPattern := sel asStringWithoutFinalCR.
-            ]
-        ].
+	typeOfSelection ~~ #search ifTrue:[
+	    typeOfSelection ~~ #paste ifTrue:[
+		self cursorLine:selectionStartLine col:selectionStartCol.
+		searchPattern := sel asStringWithoutFinalCR.
+	    ]
+	].
     ].
 
     ^ searchPattern
@@ -8151,10 +8151,10 @@
      cursor to be moved in this case."
 
     list isNil ifTrue:[
-        self unselect
+	self unselect
     ] ifFalse:[
-        super selectFromLine:1 col:1 toLine:(list size + 1) col:0.
-        typeOfSelection := nil
+	super selectFromLine:1 col:1 toLine:(list size + 1) col:0.
+	typeOfSelection := nil
     ]
 
     "Modified: 28.2.1997 / 19:14:54 / cg"
@@ -8179,8 +8179,8 @@
     "select cursorline up to cursor position"
 
     cursorCol > 1 ifTrue:[
-        self selectFromLine:cursorLine col:1
-                     toLine:cursorLine col:(cursorCol-1)
+	self selectFromLine:cursorLine col:1
+		     toLine:cursorLine col:(cursorCol-1)
     ]
 
     "Modified: 16.8.1996 / 19:14:14 / cg"
@@ -8190,11 +8190,11 @@
     "expand selection by one line or select cursorline"
 
     selectionStartLine isNil ifTrue:[
-        self selectCursorLine
+	self selectCursorLine
     ] ifFalse:[
-        self selectFromLine:selectionStartLine col:selectionStartCol
-                     toLine:cursorLine+1 col:0.
-        self makeLineVisible:selectionEndLine
+	self selectFromLine:selectionStartLine col:selectionStartCol
+		     toLine:cursorLine+1 col:0.
+	self makeLineVisible:selectionEndLine
     ]
 !
 
@@ -8204,15 +8204,15 @@
     | newCursorCol ln |
 
     list isNil ifTrue:[
-        self unselect
+	self unselect
     ] ifFalse:[
-        cursorCol > 1 ifTrue:[
-            ln := list at: cursorLine.
-            newCursorCol := ln notEmptyOrNil ifTrue:[ln indexOfNonSeparator] ifFalse:[1].
-            self selectFromLine:cursorLine col:newCursorCol toLine:cursorLine col:cursorCol-1.
-            cursorCol := newCursorCol.
-            typeOfSelection := nil
-        ]
+	cursorCol > 1 ifTrue:[
+	    ln := list at: cursorLine.
+	    newCursorCol := ln notEmptyOrNil ifTrue:[ln indexOfNonSeparator] ifFalse:[1].
+	    self selectFromLine:cursorLine col:newCursorCol toLine:cursorLine col:cursorCol-1.
+	    cursorCol := newCursorCol.
+	    typeOfSelection := nil
+	]
     ]
 
     "Created: / 28-06-2011 / 22:47:04 / cg"
@@ -8225,15 +8225,15 @@
     |col|
 
     list isNil ifTrue:[
-        self unselect
+	self unselect
     ] ifFalse:[
-        cursorCol == 0 ifTrue:[
-            col := 0
-        ] ifFalse:[
-            col := cursorCol - 1
-        ].
-        super selectFromLine:1 col:1 toLine:cursorLine col:col.
-        typeOfSelection := nil
+	cursorCol == 0 ifTrue:[
+	    col := 0
+	] ifFalse:[
+	    col := cursorCol - 1
+	].
+	super selectFromLine:1 col:1 toLine:cursorLine col:col.
+	typeOfSelection := nil
     ]
 !
 
@@ -8243,7 +8243,7 @@
 
     super selectFromLine:startLine col:startCol toLine:endLine col:endCol.
     (selectionEndLine notNil and:[self autoMoveCursorToEndOfSelection]) ifTrue:[
-        self cursorLine:selectionEndLine col:(selectionEndCol + 1).
+	self cursorLine:selectionEndLine col:(selectionEndCol + 1).
     ].
     typeOfSelection := nil
 !
@@ -8254,18 +8254,18 @@
     | newCursorCol line |
 
     list isNil ifTrue:[
-        self unselect
+	self unselect
     ] ifFalse:[
-        cursorCol >= 1 ifTrue:[
-            line := list at: cursorLine.
-            newCursorCol := line size.
-            [ newCursorCol > 1 and:[(line at:newCursorCol) isSeparator] ]      
-                whileTrue:[newCursorCol := newCursorCol - 1].
-
-            self selectFromLine:cursorLine col:cursorCol toLine:cursorLine col: newCursorCol.
-            cursorCol := newCursorCol.
-            typeOfSelection := nil
-        ]
+	cursorCol >= 1 ifTrue:[
+	    line := list at: cursorLine.
+	    newCursorCol := line size.
+	    [ newCursorCol > 1 and:[(line at:newCursorCol) isSeparator] ]
+		whileTrue:[newCursorCol := newCursorCol - 1].
+
+	    self selectFromLine:cursorLine col:cursorCol toLine:cursorLine col: newCursorCol.
+	    cursorCol := newCursorCol.
+	    typeOfSelection := nil
+	]
     ]
 
     "Created: / 28-06-2011 / 23:07:07 / cg"
@@ -8276,10 +8276,10 @@
     "select the text from the current cursor position to the end."
 
     list isNil ifTrue:[
-        self unselect
+	self unselect
     ] ifFalse:[
-        super selectFromLine:cursorLine col:cursorCol toLine:(list size + 1) col:0.
-        typeOfSelection := nil
+	super selectFromLine:cursorLine col:cursorCol toLine:(list size + 1) col:0.
+	typeOfSelection := nil
     ]
 !
 
@@ -8311,89 +8311,89 @@
      If current selection is not last string, search forward to
      next occurrence of it before repeating the last operation."
 
-    |s l c sel savedSelectStyle startColForSearch 
+    |s l c sel savedSelectStyle startColForSearch
      lastStringToReplace lastReplaceIgnoredCase lastReplaceWasMatch|
 
     lastStringToReplace := lastReplacementInfo lastStringToReplace.
     lastStringToReplace isNil ifTrue:[
-        ^ false
+	^ false
     ].
     lastReplaceIgnoredCase := lastReplacementInfo lastReplaceIgnoredCase.
     lastReplaceWasMatch := lastReplacementInfo lastReplaceWasMatch.
 
     self undoableDo:[
-        s := lastStringToReplace asString.
-        "remove final cr"
-        (s endsWith:Character cr) ifTrue:[s := s copyButLast:1].
+	s := lastStringToReplace asString.
+	"remove final cr"
+	(s endsWith:Character cr) ifTrue:[s := s copyButLast:1].
     "/        s := s withoutSpaces.        "XXX - replacing text with spaces ..."
 
-        "set lastStringToReplace as the next search string 
-         and set lastReplaceIgnoredCase as the next search ignored case flag"
-        lastStringFromReplaceForNextSearch := s.
-        lastSearchIgnoredCase := lastReplaceIgnoredCase.
-
-        savedSelectStyle := selectStyle.
-        selectStyle := nil.
-
-        sel := self selection.
-
-        "if we are already there (after a find), ommit search"
-
-        (sel notNil and:[sel asString withoutSeparators = s]) ifTrue:[
-            l := selectionStartLine "cursorLine".
-            c := selectionStartCol "cursorCol".
-            self deleteSelection.
-            lastReplacementInfo lastReplacement notNil ifTrue:[
-                self insertLines:lastReplacementInfo lastReplacement asStringCollection withCR:false.
-                self selectFromLine:l col:c toLine:cursorLine col:(cursorCol - 1).
-                typeOfSelection := #paste
-            ].
-            selectStyle := savedSelectStyle.
-            ^ true
-        ].
-
-        sel isEmptyOrNil ifTrue:[
-            startColForSearch := cursorCol - 1
-        ] ifFalse:[
-            startColForSearch := selectionEndCol ? (cursorCol - 1)
-        ].
-        self 
-            searchForwardFor:s
-            ignoreCase: lastReplaceIgnoredCase 
-            match: lastReplaceWasMatch 
-            startingAtLine:cursorLine col:startColForSearch
-            ifFound:
-                [
-                    :line :col |
-
-                    |repl|
-
-                    self selectFromLine:line col:col
-                                 toLine:line col:(col + s size - 1).
-                    self makeLineVisible:line.
-
-                    self deleteSelection.
-                    lastReplacementInfo lastReplacement notNil ifTrue:[
-                        lastReplacementInfo lastReplacement isString ifFalse:[
-                            repl := lastReplacementInfo lastReplacement asString "withoutSpaces"
-                        ] ifTrue:[
-                            repl := lastReplacementInfo lastReplacement "withoutSpaces".
-                        ].
-                        self insertLines:repl asStringCollection withCR:false.
-                        self selectFromLine:line col:col toLine:cursorLine col:(cursorCol - 1).
-                        undoSupport actionInfo:'replace'.
-                    ].
-                    selectStyle := savedSelectStyle.
-                    typeOfSelection := #paste.
-                    ^ true
-                ]
-            ifAbsent:
-                [
-                    self sensor compressKeyPressEventsWithKey:#Again.
-                    self showNotFound.
-                    selectStyle := savedSelectStyle.
-                    ^ false
-                ].
+	"set lastStringToReplace as the next search string
+	 and set lastReplaceIgnoredCase as the next search ignored case flag"
+	lastStringFromReplaceForNextSearch := s.
+	lastSearchIgnoredCase := lastReplaceIgnoredCase.
+
+	savedSelectStyle := selectStyle.
+	selectStyle := nil.
+
+	sel := self selection.
+
+	"if we are already there (after a find), ommit search"
+
+	(sel notNil and:[sel asString withoutSeparators = s]) ifTrue:[
+	    l := selectionStartLine "cursorLine".
+	    c := selectionStartCol "cursorCol".
+	    self deleteSelection.
+	    lastReplacementInfo lastReplacement notNil ifTrue:[
+		self insertLines:lastReplacementInfo lastReplacement asStringCollection withCR:false.
+		self selectFromLine:l col:c toLine:cursorLine col:(cursorCol - 1).
+		typeOfSelection := #paste
+	    ].
+	    selectStyle := savedSelectStyle.
+	    ^ true
+	].
+
+	sel isEmptyOrNil ifTrue:[
+	    startColForSearch := cursorCol - 1
+	] ifFalse:[
+	    startColForSearch := selectionEndCol ? (cursorCol - 1)
+	].
+	self
+	    searchForwardFor:s
+	    ignoreCase: lastReplaceIgnoredCase
+	    match: lastReplaceWasMatch
+	    startingAtLine:cursorLine col:startColForSearch
+	    ifFound:
+		[
+		    :line :col |
+
+		    |repl|
+
+		    self selectFromLine:line col:col
+				 toLine:line col:(col + s size - 1).
+		    self makeLineVisible:line.
+
+		    self deleteSelection.
+		    lastReplacementInfo lastReplacement notNil ifTrue:[
+			lastReplacementInfo lastReplacement isString ifFalse:[
+			    repl := lastReplacementInfo lastReplacement asString "withoutSpaces"
+			] ifTrue:[
+			    repl := lastReplacementInfo lastReplacement "withoutSpaces".
+			].
+			self insertLines:repl asStringCollection withCR:false.
+			self selectFromLine:line col:col toLine:cursorLine col:(cursorCol - 1).
+			undoSupport actionInfo:'replace'.
+		    ].
+		    selectStyle := savedSelectStyle.
+		    typeOfSelection := #paste.
+		    ^ true
+		]
+	    ifAbsent:
+		[
+		    self sensor compressKeyPressEventsWithKey:#Again.
+		    self showNotFound.
+		    selectStyle := savedSelectStyle.
+		    ^ false
+		].
     ].
 
     ^ true.
@@ -8423,9 +8423,9 @@
     "undo the last undo"
 
     undoSupport hasRedoAction ifFalse:[
-        self beep
+	self beep
     ] ifTrue:[
-        undoSupport redo.
+	undoSupport redo.
     ]
 !
 
@@ -8433,9 +8433,9 @@
     "undo the last edit operation"
 
     undoSupport hasUndoAction ifFalse:[
-        self beep
+	self beep
     ] ifTrue:[
-        undoSupport undo.
+	undoSupport undo.
     ]
 !
 
@@ -8449,26 +8449,26 @@
     |selectionRestore|
 
     self checkModificationsAllowed ifFalse:[
-        "/ will trigger an error-dialog there (no need for undo-carekeeping)
-        aBlock value.
+	"/ will trigger an error-dialog there (no need for undo-carekeeping)
+	aBlock value.
     ] ifTrue:[
-        undoSupport isInTransaction ifFalse:[
-            selectionRestore := RestoreSelectionAndCursor new 
-                                    cursorLine:cursorLine cursorCol:cursorCol
-                                    selectionStartLine:selectionStartLine selectionStartCol:selectionStartCol
-                                    selectionEndLine:selectionEndLine selectionEndCol:selectionEndCol
-                                    info:nil.
-        ].
-        undoSupport 
-            undoableDo:[
-                aBlock value.
-                selectionRestore notNil ifTrue:[
-                    undoSupport transactionNotEmpty ifTrue:[
-                        undoSupport addUndoFirst:selectionRestore 
-                    ].
-                ].
-            ]
-            info:aString.
+	undoSupport isInTransaction ifFalse:[
+	    selectionRestore := RestoreSelectionAndCursor new
+				    cursorLine:cursorLine cursorCol:cursorCol
+				    selectionStartLine:selectionStartLine selectionStartCol:selectionStartCol
+				    selectionEndLine:selectionEndLine selectionEndCol:selectionEndCol
+				    info:nil.
+	].
+	undoSupport
+	    undoableDo:[
+		aBlock value.
+		selectionRestore notNil ifTrue:[
+		    undoSupport transactionNotEmpty ifTrue:[
+			undoSupport addUndoFirst:selectionRestore
+		    ].
+		].
+	    ]
+	    info:aString.
     ].
 
     "Modified: / 30-04-2016 / 21:08:30 / cg"
@@ -8565,10 +8565,10 @@
 executeIn:editor
     editor unselect.
     editor
-        deleteFromLine:line1
-        col:col1
-        toLine:line2
-        col:col2.
+	deleteFromLine:line1
+	col:col1
+	toLine:line2
+	col:col2.
     editor cursorLine:line1 col:col1.
 ! !
 
@@ -8619,9 +8619,9 @@
      (i.e. single-character typing)"
 
     previousDeleteAction line == line ifTrue:[
-        previousDeleteAction col2 == (col1-1) ifTrue:[
-            ^ true
-        ].
+	previousDeleteAction col2 == (col1-1) ifTrue:[
+	    ^ true
+	].
     ].
 
     ^ false
@@ -8640,10 +8640,10 @@
 executeIn:editor
     editor unselect.
     editor
-        deleteFromLine:line
-        col:col1
-        toLine:line
-        col:col2.
+	deleteFromLine:line
+	col:col1
+	toLine:line
+	col:col2.
     editor cursorLine:line col:col1.
 ! !
 
@@ -8767,14 +8767,14 @@
     oldString := lastStringToReplace.
     newString := lastReplacement.
     (oldString notEmptyOrNil and:[newString notEmptyOrNil]) ifTrue:[
-        previousReplacements isNil ifTrue:[
-            previousReplacements := OrderedCollection new.
-        ].
-        previousReplacements := previousReplacements reject:[:entry | entry key = oldString].
-        previousReplacements addFirst:(oldString -> newString).
-        previousReplacements size > 20 ifTrue:[
-            previousReplacements removeLast.
-        ]
+	previousReplacements isNil ifTrue:[
+	    previousReplacements := OrderedCollection new.
+	].
+	previousReplacements := previousReplacements reject:[:entry | entry key = oldString].
+	previousReplacements addFirst:(oldString -> newString).
+	previousReplacements size > 20 ifTrue:[
+	    previousReplacements removeLast.
+	]
     ].
 ! !
 
@@ -8839,9 +8839,9 @@
      (i.e. single-character deletes)"
 
     previousPasteAction line == line ifTrue:[
-        previousPasteAction col == (self col2+1) ifTrue:[
-            ^ true
-        ].
+	previousPasteAction col == (self col2+1) ifTrue:[
+	    ^ true
+	].
     ].
 
     ^ false
@@ -8873,7 +8873,7 @@
     editor cursorLine:line col:col.
     editor paste:string.
     selected ~~ true ifTrue:[
-        editor unselect
+	editor unselect
     ].
 ! !
 
@@ -8905,9 +8905,9 @@
 
 executeIn:editor
     editor
-        replace:character
-        atLine:line
-        col:col.
+	replace:character
+	atLine:line
+	col:col.
     editor cursorLine:line col:col.
 ! !
 
@@ -8954,9 +8954,9 @@
      (i.e. single-character typing)"
 
     previousReplaceAction line == line ifTrue:[
-        previousReplaceAction col2 == (col1-1) ifTrue:[
-            ^ true
-        ].
+	previousReplaceAction col2 == (col1-1) ifTrue:[
+	    ^ true
+	].
     ].
 
     ^ false
@@ -8975,9 +8975,9 @@
 
 executeIn:editor
     editor
-        replaceString:characters
-        atLine:line
-        col:col1.
+	replaceString:characters
+	atLine:line
+	col:col1.
     editor cursorLine:line col:col1.
 ! !
 
@@ -9023,9 +9023,9 @@
 
     lnr := line.
     text do:[:eachLine |
-        editor list at:lnr put:eachLine.
-        editor invalidateLine:lnr.
-        lnr := lnr + 1.
+	editor list at:lnr put:eachLine.
+	editor invalidateLine:lnr.
+	lnr := lnr + 1.
     ].
 
     "Modified: / 09-10-2006 / 10:39:16 / cg"
@@ -9033,7 +9033,7 @@
 
 !EditTextView::RestoreSelectionAndCursor methodsFor:'accessing'!
 
-cursorLine:cursorLineArg cursorCol:cursorColArg selectionStartLine:selectionStartLineArg selectionStartCol:selectionStartColArg selectionEndLine:selectionEndLineArg selectionEndCol:selectionEndColArg 
+cursorLine:cursorLineArg cursorCol:cursorColArg selectionStartLine:selectionStartLineArg selectionStartCol:selectionStartColArg selectionEndLine:selectionEndLineArg selectionEndCol:selectionEndColArg
     cursorLine := cursorLineArg.
     cursorCol := cursorColArg.
     selectionStartLine := selectionStartLineArg.
@@ -9042,10 +9042,10 @@
     selectionEndCol := selectionEndColArg.
 !
 
-cursorLine:cursorLineArg cursorCol:cursorColArg 
-        selectionStartLine:selectionStartLineArg selectionStartCol:selectionStartColArg 
-        selectionEndLine:selectionEndLineArg selectionEndCol:selectionEndColArg
-        info:info
+cursorLine:cursorLineArg cursorCol:cursorColArg
+	selectionStartLine:selectionStartLineArg selectionStartCol:selectionStartColArg
+	selectionEndLine:selectionEndLineArg selectionEndCol:selectionEndColArg
+	info:info
 
     cursorLine := cursorLineArg.
     cursorCol := cursorColArg.
@@ -9063,10 +9063,10 @@
 executeIn:editor
     (selectionStartLine notNil and:[selectionEndLine notNil
     and:[selectionStartCol notNil and:[selectionEndCol notNil]]]) ifTrue:[
-        editor setCursorLine:cursorLine col:cursorCol.
-        editor selectFromLine:selectionStartLine col:selectionStartCol toLine:selectionEndLine col:selectionEndCol
+	editor setCursorLine:cursorLine col:cursorCol.
+	editor selectFromLine:selectionStartLine col:selectionStartCol toLine:selectionEndLine col:selectionEndCol
     ] ifFalse:[
-        editor cursorLine:cursorLine col:cursorCol.
+	editor cursorLine:cursorLine col:cursorCol.
     ].
 
     "Created: / 30-04-2016 / 20:14:55 / cg"