Summary: | History 'Number of Lines' - 1 is viewable | ||
---|---|---|---|
Product: | [Applications] konsole | Reporter: | Kurt Hindenburg <khindenburg> |
Component: | general | Assignee: | Konsole Developer <konsole-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | Moderate changes to HistoryScrollBuffer, should fix problems |
Description
Kurt Hindenburg
2005-01-08 23:01:48 UTC
CVS commit by hindenburg: Correct # of history lines that are viewable. BUG: 96605 M +1 -1 TEHistory.cpp 1.28 --- kdebase/konsole/konsole/TEHistory.cpp #1.27:1.28 @@ -231,5 +231,5 @@ void HistoryScrollBuffer::addCells(ca a[ } - if (m_nbLines < m_maxNbLines - 1) ++m_nbLines; + if (m_nbLines < m_maxNbLines) ++m_nbLines; // m_histBuffer.remove(m_arrayIndex); // not necessary I may end up reverting this for 3.4. It appears to have some side-effects. And this bug shouldn't affect many people. CVS commit by hindenburg: Revert my earlier patch. CCMAIL: 96605@bugs.kde.org M +2 -1 TEHistory.cpp 1.29 --- kdebase/konsole/konsole/TEHistory.cpp #1.28:1.29 @@ -231,5 +231,6 @@ void HistoryScrollBuffer::addCells(ca a[ } - if (m_nbLines < m_maxNbLines) ++m_nbLines; + // FIXME: See BR96605 + if (m_nbLines < m_maxNbLines - 1) ++m_nbLines; // m_histBuffer.remove(m_arrayIndex); // not necessary It seems ScrollHistoryBuffer was full of strangeness and one-off errors. I believe I have a fix; I'll attach my patch (against kdebase-3.5.5). I've tested it for a half-hour or so, and I don't see any more weirdness when resizing the history. Valgrind reports no memory problems (of mine), though when shrinking the history buffer, I don't see the VmSize decrease. I blame heap fragmentation. Created attachment 19143 [details]
Moderate changes to HistoryScrollBuffer, should fix problems
Thanks for your patch Tom, I have checked and committed it. |