Remove calls to `redisplay` from `clojure-sort-ns` #579
Conversation
Won't some
Probably you should document this somewhere, otherwise you'll probably be the only user of the new functionality. :-) |
The |
I wrote this without really reading the code. :-) I'm not quite sure what's the nature of the flicker you experience. From the |
The cursor jumps around because of the |
I'd just remove the |
Ok :) that was my preference all along, so suits me! Thanks |
@@ -1843,7 +1842,6 @@ content) are considered part of the preceding sexp." | |||
(if (looking-at (regexp-quote ns)) | |||
(message "ns form is already sorted") | |||
(sleep-for 0.1) | |||
(redisplay) |
bbatsov
Nov 26, 2020
Member
I think you shoudl also kill those surrounding sleeps, as I can't see why they would be needed.
This avoids unwanted flicker when jumping from current location to ns form and back. Espeically useful when `clojure-sort-ns` is called from `before-save-hook`, and would otherwise distract the user.
Thanks! |
This avoids unwanted flicker when jumping from current location
to ns form and back. Especially useful when
clojure-sort-ns
iscalled from
before-save-hook
, and would otherwise distract the user.Before submitting a PR mark the checkboxes for the items you've done (if you
think a checkbox does not apply, then leave it unchecked):
M-x checkdoc
and fixed any warnings in the code you've written.Thanks!