I found out it is easy to fix this bug from the source package. in the file "scratch.ml", line 382, add: | 'q' -> end_draw () | '\027' -> end_draw ()