TextView.st
changeset 715 a5856fcdbf0f
parent 712 9d6da14413a7
child 722 3f297a438fec
equal deleted inserted replaced
714:5ff02d2d9fa7 715:a5856fcdbf0f
  2160         startLine := selectionStartLine.
  2160         startLine := selectionStartLine.
  2161         endLine := selectionEndLine.
  2161         endLine := selectionEndLine.
  2162 
  2162 
  2163         self unselectWithoutRedraw.
  2163         self unselectWithoutRedraw.
  2164 
  2164 
  2165         "if selection is not visible, we are done"
  2165         "/ if the selection is not visible, we are done
       
  2166 
  2166         startLine >= (firstLineShown + nLinesShown) ifTrue:[^ self].
  2167         startLine >= (firstLineShown + nLinesShown) ifTrue:[^ self].
  2167         endLine < firstLineShown ifTrue:[^ self].
  2168         endLine < firstLineShown ifTrue:[^ self].
  2168 
  2169 
  2169         startLine < firstLineShown ifTrue:[
  2170         startLine < firstLineShown ifTrue:[
  2170             startVisLine := 1
  2171             startVisLine := 1
  2174         endLine >= (firstLineShown + nLinesShown) ifTrue:[
  2175         endLine >= (firstLineShown + nLinesShown) ifTrue:[
  2175             endVisLine := nLinesShown
  2176             endVisLine := nLinesShown
  2176         ] ifFalse:[
  2177         ] ifFalse:[
  2177             endVisLine := self listLineToVisibleLine:endLine
  2178             endVisLine := self listLineToVisibleLine:endLine
  2178         ].
  2179         ].
  2179         "if its only part of a line, just redraw what has to be"
  2180 
  2180         (startVisLine == endVisLine) ifTrue:[
  2181         "/ if its only part of a line, just redraw what has to be
       
  2182 
       
  2183         (startLine == endLine) ifTrue:[
  2181             super redrawVisibleLine:startVisLine from:selectionStartCol to:selectionEndCol
  2184             super redrawVisibleLine:startVisLine from:selectionStartCol to:selectionEndCol
  2182         ] ifFalse:[
  2185         ] ifFalse:[
  2183             super redrawFromVisibleLine:startVisLine to:endVisLine
  2186             self redrawFromVisibleLine:startVisLine to:endVisLine
  2184         ].
  2187         ].
  2185     ].
  2188     ].
  2186     selectStyle := nil
  2189     selectStyle := nil
  2187 
  2190 
  2188     "Modified: 18.3.1996 / 17:19:51 / cg"
  2191     "Modified: 29.5.1996 / 14:54:11 / cg"
  2189 !
  2192 !
  2190 
  2193 
  2191 unselectWithoutRedraw
  2194 unselectWithoutRedraw
  2192     "forget selection but do not redraw the selection area
  2195     "forget selection but do not redraw the selection area
  2193      - can be done when the selected area is redrawn anyway or
  2196      - can be done when the selected area is redrawn anyway or
  2209 ! !
  2212 ! !
  2210 
  2213 
  2211 !TextView class methodsFor:'documentation'!
  2214 !TextView class methodsFor:'documentation'!
  2212 
  2215 
  2213 version
  2216 version
  2214     ^ '$Header: /cvs/stx/stx/libwidg/TextView.st,v 1.56 1996-05-28 20:20:48 cg Exp $'
  2217     ^ '$Header: /cvs/stx/stx/libwidg/TextView.st,v 1.57 1996-05-29 12:55:05 cg Exp $'
  2215 ! !
  2218 ! !