unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#29198: Cursor fringe arrow indicator not updating.
@ 2017-11-07 19:57 Keith David Bershatsky
  2017-11-07 20:37 ` Eli Zaretskii
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Keith David Bershatsky @ 2017-11-07 19:57 UTC (permalink / raw)
  To: 29198

The following code works fine with no user configuration in Emacs 25.3.  However, it does not work well with the current version of the master branch.  The overlay arrow indicator is not updating as the user moves up or down in the buffer with the keyboard arrow keys.

Step 1:  Open an Emacs built from the current master branch.

Step 2:  Got to the scratch buffer and evaluate the code below.

Step 3:  Maneuver up and down with the arrow keys navigating the code below.  The fringe bitmap indicator should track the vertical cursor position, but it does not work.


(defface +-left-fringe-cursor-face
  '((t (:foreground "firebrick")))
  "Face for `+-left-fringe-cursor-face'."
  :group '+-mode)

(defun set-fringe-cursor ()
"Doc-string"
  (if (not (and (eobp) (bolp)))
     (setq +-left-fringe-overlay-position (copy-marker (line-beginning-position)))
    (setq +-left-fringe-overlay-position  nil)))

(define-fringe-bitmap '+-cursor-left-fringe-bitmap [128 192 96 48 24 48 96 192 128] 9 8 'center)
(set-fringe-bitmap-face '+-cursor-left-fringe-bitmap '+-left-fringe-cursor-face)

;;; `overlay-arrow-bitmap' is a special SYMBOL defined in xdisp.c.
(defvar +-left-fringe-overlay-position nil
  "Doc-string.")
(make-variable-buffer-local '+-left-fringe-overlay-position)
(add-to-list 'overlay-arrow-variable-list '+-left-fringe-overlay-position)
(put '+-left-fringe-overlay-position 'overlay-arrow-bitmap '+-cursor-left-fringe-bitmap)

(add-hook 'post-command-hook 'set-fringe-cursor 'append 'local)





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-11-10  4:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-07 19:57 bug#29198: Cursor fringe arrow indicator not updating Keith David Bershatsky
2017-11-07 20:37 ` Eli Zaretskii
2017-11-07 20:48 ` Keith David Bershatsky
2017-11-08  3:39   ` Eli Zaretskii
2017-11-09  4:26 ` Keith David Bershatsky
2017-11-09 16:29   ` Eli Zaretskii
2017-11-09  4:43 ` Keith David Bershatsky
2017-11-10  4:19 ` Keith David Bershatsky

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).