Skip to content

Commit c887d64

Browse files
committed
add missing guards
fixes a bug in 88441b7
1 parent 7758b68 commit c887d64

1 file changed

Lines changed: 26 additions & 22 deletions

File tree

drracket-core-lib/drracket/private/language.rkt

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@
310310
[debugging-left-callback
311311
(λ ()
312312
(send debugging-right set-selection #f)
313-
(send debugging-bottom set-selection #f)
313+
(when debugging-bottom (send debugging-bottom set-selection #f))
314314
(debugging-radio-box-callback)
315315
(something-changed))]
316316
[debugging-right (new radio-box%
@@ -329,7 +329,7 @@
329329
[debugging-right-callback
330330
(λ ()
331331
(send debugging-left set-selection #f)
332-
(send debugging-bottom set-selection #f)
332+
(when debugging-bottom (send debugging-bottom set-selection #f))
333333
(debugging-radio-box-callback)
334334
(something-changed))]
335335
[debugging-bottom
@@ -386,26 +386,30 @@
386386
(dynamic-panel-extras dynamic-panel)
387387

388388
(define shortcuts
389-
(list (list no-debugging-or-profiling-keystroke
390-
(λ ()
391-
(send debugging-left set-selection 0)
392-
(debugging-left-callback)))
393-
(list debugging-keystroke
394-
(λ ()
395-
(send debugging-left set-selection 1)
396-
(debugging-left-callback)))
397-
(list debugging-and-profiling-keystroke
398-
(λ ()
399-
(send debugging-right set-selection 0)
400-
(debugging-right-callback)))
401-
(list test-coverage-keystroke
402-
(λ ()
403-
(send debugging-right set-selection 1)
404-
(debugging-right-callback)))
405-
(list default-debugging-keystroke
406-
(λ ()
407-
(send debugging-bottom set-selection 0)
408-
(debugging-bottom-callback)))))
389+
(append
390+
(list (list no-debugging-or-profiling-keystroke
391+
(λ ()
392+
(send debugging-left set-selection 0)
393+
(debugging-left-callback)))
394+
(list debugging-keystroke
395+
(λ ()
396+
(send debugging-left set-selection 1)
397+
(debugging-left-callback)))
398+
(list debugging-and-profiling-keystroke
399+
(λ ()
400+
(send debugging-right set-selection 0)
401+
(debugging-right-callback)))
402+
(list test-coverage-keystroke
403+
(λ ()
404+
(send debugging-right set-selection 1)
405+
(debugging-right-callback))))
406+
(cond
407+
[debugging-bottom
408+
(list (list default-debugging-keystroke
409+
(λ ()
410+
(send debugging-bottom set-selection 0)
411+
(debugging-bottom-callback))))]
412+
[else '()])))
409413

410414

411415
(drracket:language-configuration:config-panel-with-keystrokes

0 commit comments

Comments
 (0)