From 900f48115a03db2e4387adee3ca84682889546c0 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Mon, 10 Apr 2006 13:23:25 +0000 Subject: [PATCH] fixed a bug in the goto-line keyboard shortcut's error checking svn: r2652 --- collects/framework/private/keymap.ss | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/collects/framework/private/keymap.ss b/collects/framework/private/keymap.ss index 2e912ccb29..77bc2420f0 100644 --- a/collects/framework/private/keymap.ss +++ b/collects/framework/private/keymap.ss @@ -653,10 +653,11 @@ (string-constant goto-line) (string-constant goto-line))))]) (when (string? num-str) - (let ([line-num (inexact->exact (string->number num-str))]) + (let* ([possible-num (string->number num-str)] + [line-num (and possible-num (inexact->exact possible-num))]) (cond [(and (number? line-num) - (= line-num (floor line-num)) + (integer? line-num) (<= 1 line-num (+ (send edit last-paragraph) 1))) (let ([pos (send edit paragraph-start-position (sub1 line-num))])