sldb-show-source and slime-highlight-sexp need longer timer for slime-flash-region

Bug #717390 reported by mon_key
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Slime
New
Undecided
Unassigned

Bug Description

When source buffer is not displaying on a visible window, `sldb-show-source' is
not able to `slime-highlight-sexp' because `slime-flash-region' does not delay
long enough for the window to be raised.

Following patch modifies `slime-highlight-sexp' by adding a new local variable
`flash-delay` which checks if the source buffer's window is window-live-p and
adjusts to run-with-timer for a longer period if not.

(defun slime-highlight-sexp (&optional start end)
  "Highlight the first sexp after point."
  (let ((start (or start (point)))
 (end (or end (save-excursion (ignore-errors (forward-sexp)) (point))))
        (flash-delay
         (if (window-live-p (get-buffer-window (current-buffer))) 0.2 0.4)))
    (slime-flash-region start end flash-delay)))

Revision history for this message
mon_key (mon-key) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.