(defface duplicated-cursor '((t (:height 151))) "Face for frame to illustrate the issue") (set-frame-font (face-font 'duplicated-cursor)) (defun insert-height (h ascent) ;; use a PBM image, due to problems with XBM (see #36337) (insert-image `(image :type pbm :data ,(format "P1\n1 %s\n%s" h (make-string h ?0)) :ascent ,ascent) "t")) (defun goto-last-window-line () (while (pos-visible-in-window-p) (insert "\n")) (delete-char -1)) (defun duplicate-cursor () (interactive) (switch-to-buffer (get-buffer-create "duplicated-cursor")) (erase-buffer) (insert "\n\n") (insert-height 160 80) (let ((m (point-marker))) (insert-height 125 'center) (goto-last-window-line) (redisplay) (delete-region (point) m) (insert-height 112 'center) (insert "\n\n") (insert-height 6 100) (insert (propertize "\n" 'face '(:height 1) 'line-height t 'rear-nonsticky t)) (goto-last-window-line) (previous-line)))