Skip to content

Commit

Permalink
Remove duplicate ctrl+alt+left/right handling
Browse files Browse the repository at this point in the history
These key combinations were registered as accelerator keystrokes in the
tab bar popup menu, but also handled by EditorListener. This was
probably added in an attempt to work around the broken accelerator keys
on the tab bar popup menus, but in practice this only meant that the
shortcut would sometimes (and now that the accelerator keys are fixed,
always) switch tabs *twice*. Removing the handling from EditorListener
helps to fix this.

References: arduino#4228
  • Loading branch information
Matthijs Kooijman authored and lmihalkovic committed Dec 31, 2015
1 parent f3b62c1 commit 1a8ae26
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions app/src/processing/app/EditorListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,6 @@ public void keyPressed(KeyEvent event) {
sketch.handlePrevCode();
}

// Navigation..
if ((event.getModifiers() & CTRL_ALT) == CTRL_ALT) {
if (code == KeyEvent.VK_LEFT) {
sketch.handlePrevCode();
} else if (code == KeyEvent.VK_RIGHT) {
sketch.handleNextCode();
}
}

// if (event.isAltDown() && code == KeyEvent.VK_T) {
// int line = textarea.getCaretLineNumber();
// textarea.setActiveLineRange(line, line + 3);
Expand Down

0 comments on commit 1a8ae26

Please sign in to comment.