1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-01 12:24:14 +01:00

Remove duplicate ctrl+alt+left/right handling

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: #4228
This commit is contained in:
Matthijs Kooijman 2015-12-09 11:32:57 +01:00
parent a3ba935a57
commit e98285f900

View File

@ -54,15 +54,6 @@ public class EditorListener implements KeyListener {
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);