From: Eli Zaretskii <eliz@gnu.org>
To: Eric S Fraga <e.fraga@ucl.ac.uk>
Cc: emacs-devel@gnu.org
Subject: Re: Emacs master, faces with :extend t let cursor vanish at EOL?!
Date: Thu, 31 Oct 2019 19:10:33 +0200 [thread overview]
Message-ID: <8336f8on7a.fsf@gnu.org> (raw)
In-Reply-To: <87wockj1m4.fsf@ucl.ac.uk> (message from Eric S Fraga on Thu, 31 Oct 2019 16:55:47 +0000)
> From: Eric S Fraga <e.fraga@ucl.ac.uk>
> Date: Thu, 31 Oct 2019 16:55:47 +0000
>
> #+begin_src emacs-lisp
> (defun esf/get-visual-line-range ()
> (let (b e r)
> (save-excursion
> (beginning-of-visual-line)
> (setq b (point))
> (end-of-visual-line)
> (setq e (point))
> ;; (setq e (+ 1 (point)))
> ;; (beginning-of-line)
> ;; (setq r (point)) ;real beginning of line
> ;; (if (< r b) (setq b (+ b 1))) ;adjust to avoid extension backwards
> )
> (cons b e)))
> (setq hl-line-range-function #'esf/get-visual-line-range)
> #+end_src
>
> If I uncomment the first commented line, and comment out the one above,
> I get the hl-line face extended very nicely to the edge of the window
> *but* my cursor disappears if it is past the last text character on the
> line. If I keep the code as it is, the hl-line face only covers the
> text, it is not extended, and the cursor is visible.
I cannot reproduce any of this, sorry. Could you please show a step
by step recipe, starting from "emacs -Q", then evaluating your
function, loading hl-line, turning it on, etc. -- whatever needs to be
done to reproduce the problem, with all the details?
Thanks.
next prev parent reply other threads:[~2019-10-31 17:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <8736fko8wr.fsf@kenko.localhost.com>
2019-10-22 20:17 ` [O] Emacs master, faces with :extend t let cursor vanish at EOL?! Kaushal Modi
2019-10-23 16:06 ` Eli Zaretskii
2019-10-31 16:55 ` Eric S Fraga
2019-10-31 17:10 ` Eli Zaretskii [this message]
2019-10-31 17:47 ` Eric S Fraga
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8336f8on7a.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=e.fraga@ucl.ac.uk \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).