git://git.nikiroo.be
/
fanfix.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
custom command line terminal window, blinking in color theme, scrolling region resize
[fanfix.git]
/
src
/
jexer
/
tterminal
/
ECMA48.java
diff --git
a/src/jexer/tterminal/ECMA48.java
b/src/jexer/tterminal/ECMA48.java
index 96f4e4083cc0bba8085d2df1311492214142017d..31bb5b1573cda8d66922036a40027e117b52e83f 100644
(file)
--- a/
src/jexer/tterminal/ECMA48.java
+++ b/
src/jexer/tterminal/ECMA48.java
@@
-567,9
+567,11
@@
public class ECMA48 implements Runnable {
* @param height the new height
*/
public final void setHeight(final int height) {
* @param height the new height
*/
public final void setHeight(final int height) {
+ int delta = height - this.height;
this.height = height;
this.height = height;
- if (scrollRegionBottom >= height) {
- scrollRegionBottom = height - 1;
+ scrollRegionBottom += delta;
+ if (scrollRegionBottom < 0) {
+ scrollRegionBottom = height;
}
if (scrollRegionTop >= scrollRegionBottom) {
scrollRegionTop = 0;
}
if (scrollRegionTop >= scrollRegionBottom) {
scrollRegionTop = 0;