From: David Reitter <david.reitter@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Hl-line and visual-line
Date: Thu, 20 May 2010 22:35:44 -0400 [thread overview]
Message-ID: <94F28B33-A04E-4511-B93D-E5471EE4D0DE@gmail.com> (raw)
In-Reply-To: <8339xmqob9.fsf@gnu.org>
On May 20, 2010, at 5:02 PM, Eli Zaretskii wrote:
>>
>> + (cons (progn (vertical-motion 0) (point))
>> + (progn (vertical-motion 1) (point)))))
>
> This will do The Wrong Thing with bidirectional text, because
> vertical-motion puts you on column zero, which is not necessarily the
> first character after a newline, in buffer's order of increasing
> character positions (a.k.a. "logical order"). The net effect will be
> that only part of the screen line will be highlighted.
>
> I just yesterday fixed a similar problem in move-end-of-line (see
> revno 100369). You need to proactively get to the line's first
> character, with either skip-chars-backward or (per Stefan's
> suggestion) `(forward-line 0)'.
These two seem applicable to buffer lines; I'm not sure how I would do it with word-wrap without `vertical-motion'.
Should I just use `beginning-of-visual-line' and `end-of-visual-line'?
On another note, I first thought of just implementing hl-line in the redisplay code, or perhaps as an option to the cursor display. When the cursor is drawn, we just highlight the line. No moving around overlays in Lisp...
next prev parent reply other threads:[~2010-05-21 2:35 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-20 20:30 Hl-line and visual-line David Reitter
2010-05-20 21:02 ` Eli Zaretskii
2010-05-21 2:35 ` David Reitter [this message]
2010-05-21 6:34 ` Tassilo Horn
2010-05-21 8:17 ` Eli Zaretskii
2010-05-21 10:16 ` Tassilo Horn
2010-05-21 14:22 ` David Reitter
2010-05-21 14:57 ` Eli Zaretskii
2010-05-23 17:26 ` Eli Zaretskii
2010-05-23 19:13 ` David Reitter
2010-05-23 20:33 ` Eli Zaretskii
2010-05-23 23:04 ` David Reitter
2010-05-24 18:16 ` Eli Zaretskii
2010-05-24 18:46 ` Stefan Monnier
2010-05-24 19:06 ` Lennart Borgman
2010-05-24 22:24 ` Eli Zaretskii
2010-05-24 22:37 ` Lennart Borgman
2010-05-24 22:47 ` David Reitter
2010-05-24 23:03 ` Lennart Borgman
2010-05-21 16:54 ` Lennart Borgman
2010-05-21 17:39 ` Eli Zaretskii
2010-05-21 20:24 ` Stefan Monnier
2010-05-21 22:31 ` Lennart Borgman
2010-05-22 0:18 ` Stefan Monnier
2010-05-22 2:35 ` Lennart Borgman
2010-05-22 13:10 ` Lennart Borgman
2010-05-22 17:04 ` Lennart Borgman
2010-05-21 6:36 ` Eli Zaretskii
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=94F28B33-A04E-4511-B93D-E5471EE4D0DE@gmail.com \
--to=david.reitter@gmail.com \
--cc=eliz@gnu.org \
--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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.