@ -118,7 +118,6 @@ void TerminalDisplay::setScreenWindow(ScreenWindow* window)
_screenWindow = window ;
_screenWindow = window ;
if ( ! _screenWindow . isNull ( ) ) {
if ( ! _screenWindow . isNull ( ) ) {
connect ( _screenWindow . data ( ) , & Konsole : : ScreenWindow : : outputChanged , this , & Konsole : : TerminalDisplay : : updateLineProperties ) ;
connect ( _screenWindow . data ( ) , & Konsole : : ScreenWindow : : outputChanged , this , & Konsole : : TerminalDisplay : : updateImage ) ;
connect ( _screenWindow . data ( ) , & Konsole : : ScreenWindow : : outputChanged , this , & Konsole : : TerminalDisplay : : updateImage ) ;
connect ( _screenWindow . data ( ) , & Konsole : : ScreenWindow : : currentResultLineChanged , this , & Konsole : : TerminalDisplay : : updateImage ) ;
connect ( _screenWindow . data ( ) , & Konsole : : ScreenWindow : : currentResultLineChanged , this , & Konsole : : TerminalDisplay : : updateImage ) ;
connect ( _screenWindow . data ( ) , & Konsole : : ScreenWindow : : outputChanged , this , [ this ] ( ) {
connect ( _screenWindow . data ( ) , & Konsole : : ScreenWindow : : outputChanged , this , [ this ] ( ) {
@ -436,7 +435,6 @@ void TerminalDisplay::scrollScreenWindow(enum ScreenWindow::RelativeScrollMode m
{
{
_screenWindow - > scrollBy ( mode , amount , _scrollBar - > scrollFullPage ( ) ) ;
_screenWindow - > scrollBy ( mode , amount , _scrollBar - > scrollFullPage ( ) ) ;
_screenWindow - > setTrackOutput ( _screenWindow - > atEndOfOutput ( ) ) ;
_screenWindow - > setTrackOutput ( _screenWindow - > atEndOfOutput ( ) ) ;
updateLineProperties ( ) ;
updateImage ( ) ;
updateImage ( ) ;
viewScrolledByUser ( ) ;
viewScrolledByUser ( ) ;
}
}
@ -521,6 +519,7 @@ void TerminalDisplay::updateImage()
Character * const newimg = _screenWindow - > getImage ( ) ;
Character * const newimg = _screenWindow - > getImage ( ) ;
const int lines = _screenWindow - > windowLines ( ) ;
const int lines = _screenWindow - > windowLines ( ) ;
const int columns = _screenWindow - > windowColumns ( ) ;
const int columns = _screenWindow - > windowColumns ( ) ;
QVector < LineProperty > newLineProperties = _screenWindow - > getLineProperties ( ) ;
_scrollBar - > setScroll ( _screenWindow - > currentLine ( ) , _screenWindow - > lineCount ( ) ) ;
_scrollBar - > setScroll ( _screenWindow - > currentLine ( ) , _screenWindow - > lineCount ( ) ) ;
@ -609,12 +608,8 @@ void TerminalDisplay::updateImage()
}
}
}
}
//both the top and bottom halves of double height _lines must always be redrawn
if ( y > = _lineProperties . count ( ) | | y > = newLineProperties . count ( ) | | _lineProperties [ y ] ! = newLineProperties [ y ] ) {
//although both top and bottom halves contain the same characters, only
updateLine = true ;
//the top one is actually
//drawn.
if ( _lineProperties . count ( ) > y ) {
updateLine | = ( _lineProperties [ y ] & LINE_DOUBLEHEIGHT_TOP ) ;
}
}
// if the characters on the line are different in the old and the new _image
// if the characters on the line are different in the old and the new _image
@ -636,6 +631,7 @@ void TerminalDisplay::updateImage()
// current line of the new _image
// current line of the new _image
memcpy ( ( void * ) currentLine , ( const void * ) newLine , columnsToUpdate * sizeof ( Character ) ) ;
memcpy ( ( void * ) currentLine , ( const void * ) newLine , columnsToUpdate * sizeof ( Character ) ) ;
}
}
_lineProperties = newLineProperties ;
// if the new _image is smaller than the previous _image, then ensure that the area
// if the new _image is smaller than the previous _image, then ensure that the area
// outside the new _image is cleared
// outside the new _image is cleared
@ -1552,15 +1548,6 @@ void TerminalDisplay::setExpandedMode(bool expand)
_headerBar - > setExpandedMode ( expand ) ;
_headerBar - > setExpandedMode ( expand ) ;
}
}
void TerminalDisplay : : updateLineProperties ( )
{
if ( _screenWindow . isNull ( ) ) {
return ;
}
_lineProperties = _screenWindow - > getLineProperties ( ) ;
}
void TerminalDisplay : : processMidButtonClick ( QMouseEvent * ev )
void TerminalDisplay : : processMidButtonClick ( QMouseEvent * ev )
{
{
if ( ! _usesMouseTracking | | ( ( ev - > modifiers ( ) & Qt : : ShiftModifier ) ! = 0u ) ) {
if ( ! _usesMouseTracking | | ( ( ev - > modifiers ( ) & Qt : : ShiftModifier ) ! = 0u ) ) {