[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [Bug 95990] Changing history lines count to 1 causes a crash while
From:       "Kurt V.Hindenburg" <kurt.hindenburg () kdemail ! net>
Date:       2005-01-08 19:28:45
Message-ID: 20050108192845.9506.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
        
http://bugs.kde.org/show_bug.cgi?id=95990        




------- Additional Comments From kurt.hindenburg kdemail net  2005-01-08 20:28 \
------- Comment #3 is not enough to prevent the crashing.

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       8 Jan 2005 19:27:04 -0000
 @ -230,7 +230,7  @ void HistoryScrollBuffer::addCells(ca a[
      m_buffFilled = true;
     }

-  if (m_nbLines < m_maxNbLines - 1) ++m_nbLines;
+  if (m_nbLines < m_maxNbLines) ++m_nbLines;

   // m_histBuffer.remove(m_arrayIndex); // not necessary
   m_histBuffer.insert(m_arrayIndex, newLine);
 @ -329,6 +329,7  @ void HistoryScrollBuffer::setMaxNbLines(

 int HistoryScrollBuffer::adjustLineNb(int lineno)
 {
+  if (lineno == 0) return 0;
   if (m_buffFilled)
       return (lineno + m_arrayIndex + 2) % m_maxNbLines;
   else

On another note, changing the history line # to a smaller # when there is text in the \
buffer is buggy.  Looks like void HistoryScrollBuffer::setMaxNbLines() needs fixed.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic