From b82fab09f73015da83bb1014cd5072ae74112fde Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Sun, 27 Nov 2016 02:18:48 +0800 Subject: [PATCH] TerminalEmulatorAutoCloseTrigger.CloseOnEscape --- source/net/filebot/cli/CmdlineOperationsTextUI.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/net/filebot/cli/CmdlineOperationsTextUI.java b/source/net/filebot/cli/CmdlineOperationsTextUI.java index 30a349ff..d390b439 100644 --- a/source/net/filebot/cli/CmdlineOperationsTextUI.java +++ b/source/net/filebot/cli/CmdlineOperationsTextUI.java @@ -31,6 +31,7 @@ import com.googlecode.lanterna.screen.Screen; import com.googlecode.lanterna.screen.TerminalScreen; import com.googlecode.lanterna.terminal.DefaultTerminalFactory; import com.googlecode.lanterna.terminal.Terminal; +import com.googlecode.lanterna.terminal.swing.TerminalEmulatorAutoCloseTrigger; import net.filebot.RenameAction; import net.filebot.similarity.Match; @@ -45,7 +46,7 @@ public class CmdlineOperationsTextUI extends CmdlineOperations { private MultiWindowTextGUI ui; public CmdlineOperationsTextUI() throws Exception { - terminal = new DefaultTerminalFactory().createTerminal(); + terminal = new DefaultTerminalFactory().setTerminalEmulatorFrameAutoCloseTrigger(TerminalEmulatorAutoCloseTrigger.CloseOnEscape).createTerminal(); screen = new TerminalScreen(terminal); ui = new MultiWindowTextGUI(screen, new DefaultWindowManager(), new EmptySpace(TextColor.ANSI.DEFAULT));