Skip to content

Commit

Permalink
Switch "enter" and "shift+enter" behavior in REPL
Browse files Browse the repository at this point in the history
"enter" sends command
"shift+enter" goes to newline (and does not send command)
  • Loading branch information
kephale committed Nov 28, 2020
1 parent f125769 commit a231224
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/sc/iview/ui/REPLEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ protected void processKeyEvent(KeyEvent e) {
return;
}

if(e.isControlDown() && e.getKeyCode() == KeyEvent.VK_ENTER && e.getID() == KeyEvent.KEY_RELEASED) {
if(!e.isShiftDown() && e.getKeyCode() == KeyEvent.VK_ENTER && e.getID() == KeyEvent.KEY_RELEASED) {
String text = getText();
if(text.length() == 0) {
e.consume();
Expand Down

0 comments on commit a231224

Please sign in to comment.