Skip to content

Commit

Permalink
Fix editor issue
Browse files Browse the repository at this point in the history
  • Loading branch information
rahmanusta committed Oct 18, 2017
1 parent 3fc3b28 commit d8e8346
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public class TerminalService {
private final TerminalSocket terminalSocket;
private ProcessWrapper processWrapper;
private BufferedWriter outputWriter;
private boolean firstSent = false;

private String cols = "80";
private String rows = "20";
Expand Down Expand Up @@ -126,8 +127,6 @@ private void initializeProcess() throws Exception {
printReader(errorReader);
});

this.onCommand(outputWriter, "/set editor /usr/bin/vim\n");

processWrapper.getProcess().waitFor();

destroyProcess();
Expand Down Expand Up @@ -165,6 +164,11 @@ public void print(String text) throws IOException {

if (terminalSocket.isOpen()) {
terminalSocket.send(message);

if (!firstSent) {
firstSent = true;
this.onCommand(outputWriter, "/set editor /usr/bin/vim\n");
}
}

}
Expand Down

0 comments on commit d8e8346

Please sign in to comment.