summaryrefslogtreecommitdiff
path: root/core/apps/embeddedkonsole/TEScreen.cpp
Side-by-side diff
Diffstat (limited to 'core/apps/embeddedkonsole/TEScreen.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/embeddedkonsole/TEScreen.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/core/apps/embeddedkonsole/TEScreen.cpp b/core/apps/embeddedkonsole/TEScreen.cpp
index a6cf6a1..4ebc28e 100644
--- a/core/apps/embeddedkonsole/TEScreen.cpp
+++ b/core/apps/embeddedkonsole/TEScreen.cpp
@@ -512,2 +512,6 @@ ca* TEScreen::getCookedImage()
+ if (histCursor > hist.getLines()) {
+ histCursor = hist.getLines();
+ }
+
for (y = 0; (y < lines) && (y < (hist.getLines()-histCursor)); y++)
@@ -560,3 +564,3 @@ void TEScreen::reset()
{
- Config cfg("Konsole");
+ Config cfg("Qkonsole");
cfg.setGroup("ScrollBar");
@@ -973,2 +977,5 @@ void TEScreen::setSelBeginXY(const int x, const int y)
{
+ if (histCursor > hist.getLines()) {
+ histCursor = hist.getLines();
+ }
sel_begin = loc(x,y+histCursor) ;
@@ -981,2 +988,5 @@ void TEScreen::setSelExtentXY(const int x, const int y)
if (sel_begin == -1) return;
+ if (histCursor > hist.getLines()) {
+ histCursor = hist.getLines();
+ }
int l = loc(x,y + histCursor);
@@ -1187,2 +1197,8 @@ void TEScreen::setHistCursor(int cursor)
histCursor = cursor; //FIXME:rangecheck
+ if (histCursor > hist.getLines()) {
+ histCursor = hist.getLines();
+ }
+ if (histCursor < 0) {
+ histCursor = 0;
+ }
}