(KeyEvent e)
| 1197 | } |
| 1198 | |
| 1199 | public void keyReleased(KeyEvent e) { |
| 1200 | int pos = ta.getCaretPosition(); |
| 1201 | //showLinePos(); |
| 1202 | if (insertSpaces && pos>0 && e.getKeyCode()==KeyEvent.VK_TAB) { |
| 1203 | String spaces = " "; |
| 1204 | for (int i=1; i<tabInc; i++) |
| 1205 | spaces += " "; |
| 1206 | ta.replaceRange(spaces, pos-1, pos); |
| 1207 | } |
| 1208 | if (interactiveMode && e.getKeyChar()=='\n') |
| 1209 | runMacro(e); |
| 1210 | } |
| 1211 | |
| 1212 | private void runMacro(KeyEvent e) { |
| 1213 | boolean isScript = getTitle().endsWith(".js"); |