Bug 55343

Summary: Feature Request: an option to preserve the scrollback buffer after a screen clear
Product: [Applications] konsole Reporter: Anthony Valentine <amv>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED FIXED    
Severity: wishlist    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Before clearing screen add its contents to the history.

Description Anthony Valentine 2003-02-28 18:12:03 UTC
Version:            (using KDE KDE 3.1)
Installed from:    Gentoo Packages

Whenever you clear the konsole screen, the lines cleared from the screen will no longer show up in the scrollback buffer.  

It would be nice to have the option of clearing the screen while keeping the cleared lines in the scrollback buffer.
Comment 1 Robert Hogan 2005-01-06 23:15:15 UTC
Created attachment 8960 [details]
Before clearing screen add its contents to the history. 



This works for me..
Comment 2 Kurt Hindenburg 2005-01-29 19:27:05 UTC
CVS commit by hindenburg: 

BUG: 55343  Add entire screen text to history before clearing it


  M +4 -0      TEScreen.cpp   1.85


--- kdebase/konsole/konsole/TEScreen.cpp  #1.84:1.85
@@ -1017,4 +1017,8 @@ void TEScreen::clearToBeginOfScreen()
 void TEScreen::clearEntireScreen()
 {
+  // Add entire screen to history
+  for (int i = 0; i < (lines-1); i++)
+    addHistLine(); scrollUp(0,1);
+
   clearImage(loc(0,0),loc(columns-1,lines-1),' ');
 }


Comment 3 Kurt Hindenburg 2005-01-29 20:27:05 UTC
Seems my CCBUG didn't work.

CVS commit by hindenburg: 

Really fix BUG 55343. CCBUG: 55343


  M +2 -0      TEScreen.cpp   1.86


--- kdebase/konsole/konsole/TEScreen.cpp  #1.85:1.86
@@ -1019,5 +1019,7 @@ void TEScreen::clearEntireScreen()
   // Add entire screen to history
   for (int i = 0; i < (lines-1); i++)
+  {
     addHistLine(); scrollUp(0,1);
+  }
 
   clearImage(loc(0,0),loc(columns-1,lines-1),' ');
Comment 4 dinesh karnad 2005-06-09 15:18:16 UTC
i am not able to get this working on REdhat 9.0 with kde 3.4.1, 
i have complied the source but the same problem
I use konsole for the telnet session and the application sends a clear screen command .
Comment 5 Kurt Hindenburg 2005-06-09 19:10:43 UTC
About #4;  this works only when Konsole clears the screen; not the application running.  So when your telnet clears the screen, Konsole knows nothing about that.