Skip to content
Snippets Groups Projects
Commit 289f1c09 authored by Lukas Stadler's avatar Lukas Stadler
Browse files

[GR-4670] Completion in console adds a blank space to the completed expression.

parents b6b17e89 c80d263f
No related branches found
No related tags found
No related merge requests found
......@@ -36,6 +36,8 @@ import com.oracle.truffle.r.runtime.context.ConsoleHandler;
import jline.console.ConsoleReader;
import jline.console.UserInterruptException;
import jline.console.completer.CandidateListCompletionHandler;
import jline.console.completer.CompletionHandler;
import jline.console.history.FileHistory;
import jline.console.history.History;
......@@ -48,6 +50,10 @@ class JLineConsoleHandler extends ConsoleHandler {
try {
console = new ConsoleReader(inStream, outStream);
console.addCompleter(new JLineConsoleCompleter(this));
CompletionHandler completionHandler = console.getCompletionHandler();
if (completionHandler instanceof CandidateListCompletionHandler) {
((CandidateListCompletionHandler) completionHandler).setPrintSpaceAfterFullCompletion(false);
}
console.setHandleUserInterrupt(true);
console.setExpandEvents(false);
} catch (IOException ex) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment