Diffstat (limited to 'core/apps/embeddedkonsole/TEScreen.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/apps/embeddedkonsole/TEScreen.cpp | 18 |
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 | |||
@@ -511,4 +511,8 @@ ca* TEScreen::getCookedImage() | |||
511 | ca dft(' ',DEFAULT_FORE_COLOR,DEFAULT_BACK_COLOR,DEFAULT_RENDITION); | 511 | ca dft(' ',DEFAULT_FORE_COLOR,DEFAULT_BACK_COLOR,DEFAULT_RENDITION); |
512 | 512 | ||
513 | if (histCursor > hist.getLines()) { | ||
514 | histCursor = hist.getLines(); | ||
515 | } | ||
516 | |||
513 | for (y = 0; (y < lines) && (y < (hist.getLines()-histCursor)); y++) | 517 | for (y = 0; (y < lines) && (y < (hist.getLines()-histCursor)); y++) |
514 | { | 518 | { |
@@ -559,5 +563,5 @@ ca* TEScreen::getCookedImage() | |||
559 | void TEScreen::reset() | 563 | void TEScreen::reset() |
560 | { | 564 | { |
561 | Config cfg("Konsole"); | 565 | Config cfg("Qkonsole"); |
562 | cfg.setGroup("ScrollBar"); | 566 | cfg.setGroup("ScrollBar"); |
563 | if( !cfg.readBoolEntry("HorzScroll",0) ) | 567 | if( !cfg.readBoolEntry("HorzScroll",0) ) |
@@ -972,4 +976,7 @@ void TEScreen::clearSelection() | |||
972 | void TEScreen::setSelBeginXY(const int x, const int y) | 976 | void TEScreen::setSelBeginXY(const int x, const int y) |
973 | { | 977 | { |
978 | if (histCursor > hist.getLines()) { | ||
979 | histCursor = hist.getLines(); | ||
980 | } | ||
974 | sel_begin = loc(x,y+histCursor) ; | 981 | sel_begin = loc(x,y+histCursor) ; |
975 | sel_BR = sel_begin; | 982 | sel_BR = sel_begin; |
@@ -980,4 +987,7 @@ void TEScreen::setSelExtentXY(const int x, const int y) | |||
980 | { | 987 | { |
981 | if (sel_begin == -1) return; | 988 | if (sel_begin == -1) return; |
989 | if (histCursor > hist.getLines()) { | ||
990 | histCursor = hist.getLines(); | ||
991 | } | ||
982 | int l = loc(x,y + histCursor); | 992 | int l = loc(x,y + histCursor); |
983 | 993 | ||
@@ -1186,4 +1196,10 @@ void TEScreen::setHistCursor(int cursor) | |||
1186 | { | 1196 | { |
1187 | histCursor = cursor; //FIXME:rangecheck | 1197 | histCursor = cursor; //FIXME:rangecheck |
1198 | if (histCursor > hist.getLines()) { | ||
1199 | histCursor = hist.getLines(); | ||
1200 | } | ||
1201 | if (histCursor < 0) { | ||
1202 | histCursor = 0; | ||
1203 | } | ||
1188 | } | 1204 | } |
1189 | 1205 | ||