Quick Question: Fixing Bugs

Hi, Racket Discourse.

I found a bug in the code for the append-editor-font-menu-items procedure from racket/gui. The functionality for making fonts smaller by one size is missing a negative sign.

Compare the increment,

(add-change-size bigger
                 '("+1" "+2" "+4" "+8" "+16" "+32")
                 '(1 2 4 8 16 32)
                 '(1 1 1 1 1  1))

as opposed to the decrement.

(add-change-size smaller
                 '("-1" "-2" "-4" "-8" "-16" "-32")
                 '(1 -2 -4 -8 -16 -32)
                 '(1 1   1  1  1  1))

I found these snippets in the gui/gui-lib/mred/private/editor.rkt file in here.

What is the etiquette for such a situation? I've never reported/fixed a bug before.

I would think filing an “Issue” on GitHub is fine. If you have time to contribute a fix, you could send a PR.

Thanks, @benknoble. Sometimes a little hand-holding goes quite far :100:

  1. You could just open an issue.

  2. Or, you could submit a pull request.

[

A guide for infrequent contributors to Racket
greghendershott.com

favicon.ico

](A guide for infrequent contributors to Racket)

2 Likes

Wonderful, thank you, @EmEf.