Skip to content
Snippets Groups Projects
Commit 56f5b9b0 authored by Jacek Złydach's avatar Jacek Złydach
Browse files

Replaced #'unhighlight-highlighted-presentation.

Replaced it with a more thread-safe-ish version, which resolved the
weird behaviour issue.
parent 36ca4387
No related branches found
No related tags found
No related merge requests found
......@@ -468,6 +468,10 @@
presentation (presentation-type presentation)
history-window :highlight))))))))
;;; NOTE Commented out the method and replaced with a single slot-value invoking version below.
;;; The behaviour of the original method is very weird. I suspect threading issues.
;;; -- jacek.zlydach 2017-06-03
#+ (or)
(defun unhighlight-highlighted-presentation (stream &optional (prefer-pointer-window t))
(let ((history-window (if prefer-pointer-window (find-appropriate-window stream) stream)))
(when history-window
......@@ -482,6 +486,16 @@
history-window :unhighlight)
(setf highlighted-presentation nil))))))
(defun unhighlight-highlighted-presentation (stream &optional (prefer-pointer-window t))
(let ((history-window (if prefer-pointer-window (find-appropriate-window stream) stream)))
(when history-window
(let ((highlighted-presentation (slot-value history-window 'highlighted-presentation)))
(when highlighted-presentation
(highlight-presentation
highlighted-presentation (presentation-type highlighted-presentation)
history-window :unhighlight)
(setf highlighted-presentation nil))))))
(defun find-appropriate-window (stream)
;;--- How do we hack multiple pointers?
(when (extended-input-stream-p stream)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment