File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -316,21 +316,12 @@ public void keyTyped(KeyEvent event) {
316316 editField .setCaretPosition (start + 1 );
317317 event .consume ();
318318
319-
320319 } else if ((c == '_' ) || (c == '.' ) || ((c >= 'A' ) && (c <= 'Z' )) || ((c >= 'a' ) && (c <= 'z' ))) { // allow .pde and .java
321320 // these are ok, allow them through
322321
323322 } else if ((c >= '0' ) && (c <= '9' )) {
324- // getCaretPosition == 0 means that it's the first char
325- // and the field is empty.
326- // getSelectionStart means that it *will be* the first
327- // char, because the selection is about to be replaced
328- // with whatever is typed.
329- if ((editField .getCaretPosition () == 0 ) ||
330- (editField .getSelectionStart () == 0 )) {
331- // number not allowed as first digit
332- event .consume ();
333- }
323+ // these are ok, allow them through
324+
334325 } else {
335326 event .consume ();
336327 }
You can’t perform that action at this time.
0 commit comments