unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Titus von der Malsburg <malsburg@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: hl-line-mode and visual-line-mode
Date: Thu, 22 Dec 2011 16:55:48 +0100	[thread overview]
Message-ID: <CAM+LvrBRGsutsD99kMkR2hooYGtRpb+=GcOn5m3g74RT7_gyCQ@mail.gmail.com> (raw)

In visual-line-mode, global-hl-line-mode marks the whole paragraph
(the buffer line) instead of only the visual line.  This can be fixed
with this redefinition of hl-line-range-function:
  (defun visual-line-line-range ()    (save-excursion      (cons
(progn (vertical-motion 0) (point))            (progn (vertical-motion
1) (point)))))

   (setq hl-line-range-function 'visual-line-line-range)

This works nicely except that it doesn't highlight the whole line but
only the text contained in that line.  The space between the last word
and the margin is not marked.  Only lines that end with a newline
character are completely highlighted.  How can I fix this?

Thanks for any suggestions!

  Titus



             reply	other threads:[~2011-12-22 15:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-22 15:55 Titus von der Malsburg [this message]
2011-12-22 16:07 ` hl-line-mode and visual-line-mode Titus von der Malsburg

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='CAM+LvrBRGsutsD99kMkR2hooYGtRpb+=GcOn5m3g74RT7_gyCQ@mail.gmail.com' \
    --to=malsburg@gmail.com \
    --cc=help-gnu-emacs@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.
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).