Skip to content

Commit

Permalink
Fix Issue 472: Cannot paste in "Port" field of "Connect to REPL" dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentpetit committed Nov 15, 2012
1 parent d4b95e3 commit 83f0fd8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ccw.core/src/java/ccw/repl/ConnectDialog.java
Expand Up @@ -48,7 +48,8 @@ protected Control createDialogArea(Composite parent) {
port = new Text(parent, SWT.BORDER);
port.addVerifyListener(new VerifyListener() {
public void verifyText(VerifyEvent e) {
e.doit = (e.text.equals("") || Character.isDigit(e.character));
String newText = port.getText().substring(0, e.start) + e.text + port.getText().substring(e.end);
e.doit = newText.matches("\\d*");
}
});

Expand Down

0 comments on commit 83f0fd8

Please sign in to comment.