()
| 810 | } |
| 811 | |
| 812 | void undo() { |
| 813 | if (IJ.isWindows()) { |
| 814 | IJ.showMessage("Editor", "Press Ctrl-Z to undo"); |
| 815 | return; |
| 816 | } |
| 817 | if (IJ.debugMode) IJ.log("Undo1: "+undoBuffer.size()); |
| 818 | int position = ta.getCaretPosition(); |
| 819 | if (undoBuffer.size()>1) { |
| 820 | undoBuffer.remove(undoBuffer.size()-1); |
| 821 | String text = (String)undoBuffer.get(undoBuffer.size()-1); |
| 822 | performingUndo = true; |
| 823 | ta.setText(text); |
| 824 | if (position<=text.length()) |
| 825 | ta.setCaretPosition(position-offset(position)); |
| 826 | if (IJ.debugMode) IJ.log("Undo2: "+undoBuffer.size()+" "+text); |
| 827 | } |
| 828 | } |
| 829 | |
| 830 | boolean copy() { |
| 831 | String s; |
no test coverage detected