[Konsole-devel] [Bug 95990] Changing history lines count to 1 causes a crash while scrolling up

Kurt V.Hindenburg kurt.hindenburg at kdemail.net
Fri Dec 31 19:54:07 UTC 2004


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
        
http://bugs.kde.org/show_bug.cgi?id=95990        




------- Additional Comments From kurt.hindenburg kdemail net  2004-12-31 20:54 -------
0x4009c9fd in HistoryScrollBuffer::getLineLen(int) (this=0x807bb24, lineno=1)
    at qgarray.h:79
79          uint        size()   const  { return shd->len; }

It appears that for viewing history is actually History->lines - 1, which causes this error.  Note that for saving history all the lines are saved.

This appears to fix this by having viewing history to actually be history->lines.
Needs testing....

Index: TEHistory.cpp
===================================================================
RCS file: /home/kde/kdebase/konsole/konsole/TEHistory.cpp,v
retrieving revision 1.25
diff -u -p -r1.25 TEHistory.cpp
--- TEHistory.cpp       28 Jun 2003 10:31:38 -0000      1.25
+++ TEHistory.cpp       31 Dec 2004 19:51:50 -0000
 @ -230,7 +230,8  @ void HistoryScrollBuffer::addCells(ca a[
      m_buffFilled = true;
     }

-  if (m_nbLines < m_maxNbLines - 1) ++m_nbLines;
+//  if (m_nbLines < m_maxNbLines - 1) ++m_nbLines;
+  if (m_nbLines < m_maxNbLines ) ++m_nbLines; // Fixes BR95990 ?!?

   // m_histBuffer.remove(m_arrayIndex); // not necessary
   m_histBuffer.insert(m_arrayIndex, newLine);



More information about the konsole-devel mailing list