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
#57 parse raster attribute in terminal sixel
[fanfix.git]
/
src
/
jexer
/
TTerminalWindow.java
diff --git
a/src/jexer/TTerminalWindow.java
b/src/jexer/TTerminalWindow.java
index a5d92aca58bff5a8daa0aa006f9756492bd50847..0b653554e0bf8aaee31932f2f6ff84645664e39f 100644
(file)
--- a/
src/jexer/TTerminalWindow.java
+++ b/
src/jexer/TTerminalWindow.java
@@
-153,6
+153,9
@@
public class TTerminalWindow extends TScrollableWindow {
super(application, i18n.getString("windowTitle"), x, y,
80 + 2, 24 + 2, flags);
super(application, i18n.getString("windowTitle"), x, y,
80 + 2, 24 + 2, flags);
+ // Require at least one line for the display.
+ setMinimumWindowHeight(3);
+
this.closeOnExit = closeOnExit;
vScroller = new TVScroller(this, getWidth() - 2, 0, getHeight() - 2);
this.closeOnExit = closeOnExit;
vScroller = new TVScroller(this, getWidth() - 2, 0, getHeight() - 2);
@@
-163,7
+166,11
@@
public class TTerminalWindow extends TScrollableWindow {
newStatusBar(i18n.getString("statusBarRunning"));
// Spin it up
newStatusBar(i18n.getString("statusBarRunning"));
// Spin it up
- terminal = new TTerminalWidget(this, 0, 0);
+ terminal = new TTerminalWidget(this, 0, 0, new TAction() {
+ public void DO() {
+ onShellExit();
+ }
+ });
}
/**
}
/**
@@
-198,6
+205,9
@@
public class TTerminalWindow extends TScrollableWindow {
super(application, i18n.getString("windowTitle"), x, y,
80 + 2, 24 + 2, flags);
super(application, i18n.getString("windowTitle"), x, y,
80 + 2, 24 + 2, flags);
+ // Require at least one line for the display.
+ setMinimumWindowHeight(3);
+
this.closeOnExit = closeOnExit;
vScroller = new TVScroller(this, getWidth() - 2, 0, getHeight() - 2);
this.closeOnExit = closeOnExit;
vScroller = new TVScroller(this, getWidth() - 2, 0, getHeight() - 2);
@@
-208,7
+218,11
@@
public class TTerminalWindow extends TScrollableWindow {
newStatusBar(i18n.getString("statusBarRunning"));
// Spin it up
newStatusBar(i18n.getString("statusBarRunning"));
// Spin it up
- terminal = new TTerminalWidget(this, 0, 0);
+ terminal = new TTerminalWidget(this, 0, 0, new TAction() {
+ public void DO() {
+ onShellExit();
+ }
+ });
}
// ------------------------------------------------------------------------
}
// ------------------------------------------------------------------------
@@
-300,6
+314,11
@@
public class TTerminalWindow extends TScrollableWindow {
}
super.onMouseUp(mouse);
}
super.onMouseUp(mouse);
+
+ if (mouse.isMouse1() && mouseOnVerticalScroller(mouse)) {
+ // Clicked on vertical scrollbar
+ terminal.setVerticalValue(getVerticalValue());
+ }
}
/**
}
/**
@@
-316,6
+335,11
@@
public class TTerminalWindow extends TScrollableWindow {
}
super.onMouseMotion(mouse);
}
super.onMouseMotion(mouse);
+
+ if (mouse.isMouse1() && mouseOnVerticalScroller(mouse)) {
+ // Clicked/dragged on vertical scrollbar
+ terminal.setVerticalValue(getVerticalValue());
+ }
}
// ------------------------------------------------------------------------
}
// ------------------------------------------------------------------------