[Konsole-devel] [Bug 95990] Changing history lines count to 1 causes a crash while scrolling up
Kurt V.Hindenburg
kurt.hindenburg at kdemail.net
Sat Jan 8 19:28:45 UTC 2005
------- 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 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.
More information about the konsole-devel
mailing list