diff --git a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/CommandInputFieldWithHistory.java b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/CommandInputFieldWithHistory.java index 13c2cbf8d12..4fc3a062b5d 100644 --- a/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/CommandInputFieldWithHistory.java +++ b/terminal/org.eclipse.tm.terminal/src/org/eclipse/tm/internal/terminal/control/CommandInputFieldWithHistory.java @@ -211,8 +211,18 @@ public class CommandInputFieldWithHistory implements ICommandInputField { } fInputField.setLayoutData(data); fInputField.setFont(terminal.getFont()); + // register the field assist + new ContentAssistCommandAdapter( + fInputField, + new TextContentAdapter(), + new FieldAssist(), + null, + null, + installDecoration); fInputField.addKeyListener(new KeyListener(){ public void keyPressed(KeyEvent e) { + if(!e.doit) + return; if(e.keyCode=='\n' || e.keyCode=='\r') { e.doit=false; String line=fInputField.getText(); @@ -240,14 +250,6 @@ public class CommandInputFieldWithHistory implements ICommandInputField { public void keyReleased(KeyEvent e) { } }); - // register the field assist - new ContentAssistCommandAdapter( - fInputField, - new TextContentAdapter(), - new FieldAssist(), - null, - null, - installDecoration); } public void setFont(Font font) { fInputField.setFont(font);