From kde-bugs-dist Fri Dec 31 19:54:07 2004 From: "Kurt V.Hindenburg" Date: Fri, 31 Dec 2004 19:54:07 +0000 To: kde-bugs-dist Subject: [Bug 95990] Changing history lines count to 1 causes a crash while Message-Id: <20041231195407.32684.qmail () ktown ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-bugs-dist&m=110452285317875 ------- 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 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);