Skip to content

Commit

Permalink
fix jump to line command
Browse files Browse the repository at this point in the history
  • Loading branch information
jjallaire committed Jan 6, 2012
1 parent aada669 commit 92f8d83
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Expand Up @@ -109,10 +109,9 @@ protected boolean validate(String input)

if (numbersOnly_)
{
setText(getText().trim());
try
{
Integer.parseInt(getText());
Integer.parseInt(input.trim());
}
catch (NumberFormatException nfe)
{
Expand Down
Expand Up @@ -144,8 +144,8 @@ public void promptForInteger(String title,
{
@Override
public void execute(String input, ProgressIndicator indicator)
{
int value = Integer.parseInt(input);
{
int value = Integer.parseInt(input.trim());
okOperation.execute(value, indicator);
}
},
Expand Down
Expand Up @@ -1400,6 +1400,8 @@ void onGoToLine()
@Override
public void execute(Integer line, ProgressIndicator indicator)
{
indicator.onCompleted();

line = Math.max(1, line);
line = Math.min(docDisplay_.getRowCount(), line);

Expand Down

0 comments on commit 92f8d83

Please sign in to comment.