Skip to content

Commit

Permalink
[REF] Resolve magic number 32 from SPACE
Browse files Browse the repository at this point in the history
  • Loading branch information
KeyWeeUsr committed Aug 17, 2024
1 parent 118d957 commit 2d02b0e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions typewriter-roll-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,9 @@ Argument POS cursor's position."

(defun typewriter-roll--check ()
"Check after typing whether to scroll up as in typewriter."
(when (or (typewriter-roll--is-backspace) (eq last-command-event 32))
(unless (eq (char-before) 32)
(when (or (typewriter-roll--is-backspace)
(eq last-command-event (char-from-name "SPACE")))
(unless (eq (char-before) (char-from-name "SPACE"))
(typewriter-roll--scroll-main (current-column))
(typewriter-roll--scroll-up))))

Expand Down

0 comments on commit 2d02b0e

Please sign in to comment.