fixed uncommenting for prefixes other than java/js in editor

This commit is contained in:
fjenett
2012-04-08 07:38:58 +00:00
parent 660abab758
commit fd732b0938

View File

@@ -1717,9 +1717,9 @@ public abstract class Editor extends JFrame implements RunnerListener {
if (pos + prefixLen > length) {
commented = false;
} else {
// Check the first two characters to see if it's already a comment.
String begin = textarea.getText(pos, 2);
//System.out.println("begin is '" + begin + "'");
// Check the first characters to see if it's already a comment.
String begin = textarea.getText(pos, prefixLen);
System.out.println("begin is '" + begin + "'");
commented = begin.equals(prefix);
}
}