1984 "unselect - if there was a selection redraw that area" |
1984 "unselect - if there was a selection redraw that area" |
1985 |
1985 |
1986 |startLine endLine startVisLine endVisLine| |
1986 |startLine endLine startVisLine endVisLine| |
1987 |
1987 |
1988 selectionStartLine notNil ifTrue:[ |
1988 selectionStartLine notNil ifTrue:[ |
1989 startLine := selectionStartLine. |
1989 startLine := selectionStartLine. |
1990 endLine := selectionEndLine. |
1990 endLine := selectionEndLine. |
1991 selectionStartLine := nil. |
1991 |
1992 |
1992 self unselectWithoutRedraw. |
1993 "if selection is not visible, we are done" |
1993 |
1994 startLine >= (firstLineShown + nLinesShown) ifTrue:[^ self]. |
1994 "if selection is not visible, we are done" |
1995 endLine < firstLineShown ifTrue:[^ self]. |
1995 startLine >= (firstLineShown + nLinesShown) ifTrue:[^ self]. |
1996 |
1996 endLine < firstLineShown ifTrue:[^ self]. |
1997 startLine < firstLineShown ifTrue:[ |
1997 |
1998 startVisLine := 1 |
1998 startLine < firstLineShown ifTrue:[ |
1999 ] ifFalse:[ |
1999 startVisLine := 1 |
2000 startVisLine := self listLineToVisibleLine:startLine |
2000 ] ifFalse:[ |
2001 ]. |
2001 startVisLine := self listLineToVisibleLine:startLine |
2002 endLine >= (firstLineShown + nLinesShown) ifTrue:[ |
2002 ]. |
2003 endVisLine := nLinesShown |
2003 endLine >= (firstLineShown + nLinesShown) ifTrue:[ |
2004 ] ifFalse:[ |
2004 endVisLine := nLinesShown |
2005 endVisLine := self listLineToVisibleLine:endLine |
2005 ] ifFalse:[ |
2006 ]. |
2006 endVisLine := self listLineToVisibleLine:endLine |
2007 "if its only part of a line, just redraw what has to be" |
2007 ]. |
2008 (startVisLine == endVisLine) ifTrue:[ |
2008 "if its only part of a line, just redraw what has to be" |
2009 super redrawVisibleLine:startVisLine from:selectionStartCol to:selectionEndCol |
2009 (startVisLine == endVisLine) ifTrue:[ |
2010 ] ifFalse:[ |
2010 super redrawVisibleLine:startVisLine from:selectionStartCol to:selectionEndCol |
2011 super redrawFromVisibleLine:startVisLine to:endVisLine |
2011 ] ifFalse:[ |
2012 ]. |
2012 super redrawFromVisibleLine:startVisLine to:endVisLine |
2013 self unselectWithoutRedraw |
2013 ]. |
2014 ]. |
2014 ]. |
2015 selectStyle := nil |
2015 selectStyle := nil |
|
2016 |
|
2017 "Modified: 18.3.1996 / 17:19:51 / cg" |
2016 ! |
2018 ! |
2017 |
2019 |
2018 unselectWithoutRedraw |
2020 unselectWithoutRedraw |
2019 "forget selection but do not redraw the selection area |
2021 "forget selection but do not redraw the selection area |
2020 - can be done when the selected area is redrawn anyway or |
2022 - can be done when the selected area is redrawn anyway or |