mirror of
https://gitlab.com/AutumnMeowMeow/jexer
synced 2024-09-19 11:50:19 -06:00
#82 fix NPE in TTerminalWidget:spawnShell()
This commit is contained in:
parent
fcc8209517
commit
b2c901981c
2 changed files with 11 additions and 4 deletions
|
@ -48,8 +48,15 @@ public class JexerTilingWindowManager2 extends TApplication {
|
|||
// Let's also suppress the status line.
|
||||
System.setProperty("jexer.hideStatusBar", "true");
|
||||
|
||||
JexerTilingWindowManager2 jtwm = new JexerTilingWindowManager2();
|
||||
final JexerTilingWindowManager2 jtwm = new JexerTilingWindowManager2();
|
||||
(new Thread(jtwm)).start();
|
||||
|
||||
jtwm.invokeLater(new Runnable() {
|
||||
public void run() {
|
||||
// Spin up the root terminal
|
||||
jtwm.createRootTerminal();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -92,8 +99,6 @@ public class JexerTilingWindowManager2 extends TApplication {
|
|||
}
|
||||
});
|
||||
|
||||
// Spin up the root terminal
|
||||
createRootTerminal();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1000,7 +1000,9 @@ public class TTerminalWidget extends TScrollableWidget
|
|||
try {
|
||||
int scrollbackMax = Integer.parseInt(System.getProperty(
|
||||
"jexer.TTerminal.scrollbackMax", "2000"));
|
||||
if (emulator != null) {
|
||||
emulator.setScrollbackMax(scrollbackMax);
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
// SQUASH
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue