unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: storm@cua.dk (Kim F. Storm)
Cc: az@ftc.ru, emacs-devel@gnu.org
Subject: Re: [az@ftc.ru: hl-line-mode conflicts with scroll-margin]
Date: 14 Jun 2004 14:13:12 +0200	[thread overview]
Message-ID: <m33c4ytk13.fsf@kfs-l.imdomain.dk> (raw)
In-Reply-To: <E1BZIRJ-0003Q8-IH@fencepost.gnu.org>

Richard Stallman <rms@gnu.org> writes:

> [I sent this message a week ago but did not get a response.]
>
> This could be a redisplay bug.  Can someone who has
> worked on redisplay take a look at it?
>
> From: Eugeny Korekin <az@ftc.ru>
> Subject: hl-line-mode conflicts with scroll-margin
> To: emacs-pretest-bug@gnu.org
> Date: Wed,  2 Jun 2004 14:54:29 +0700 (NOVST)
>
> Symptoms:
>
> When hl-line-mode is turned on scroll-margin setting
> affects only scrolling up, but does not affects scrolling down
> (margin is only at top of window)
>


The following patch solves the problem.

But the comment in the old code says this was done deliberately.
So I don't know if the fix breaks something else...



*** xdisp.c	30 May 2004 23:13:12 +0200	1.892
--- xdisp.c	14 Jun 2004 14:09:23 +0200
***************
*** 13372,13380 ****

      if ((w->cursor.y < this_scroll_margin
  	 && CHARPOS (start) > BEGV)
! 	/* Don't take scroll margin into account at the bottom because
! 	   old redisplay didn't do it either.  */
! 	|| w->cursor.y + cursor_height > it.last_visible_y)
        {
  	w->cursor.vpos = -1;
  	clear_glyph_matrix (w->desired_matrix);
--- 13372,13380 ----

      if ((w->cursor.y < this_scroll_margin
  	 && CHARPOS (start) > BEGV)
! 	/* Old redisplay didn't take scroll margin into account at the bottom,
! 	   but then global-hl-line-mode doesn't scroll.  KFS 2004-06-14 */
! 	|| w->cursor.y + cursor_height + this_scroll_margin > it.last_visible_y)
        {
  	w->cursor.vpos = -1;
  	clear_glyph_matrix (w->desired_matrix);

--
Kim F. Storm <storm@cua.dk> http://www.cua.dk

  reply	other threads:[~2004-06-14 12:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-13  0:01 [az@ftc.ru: hl-line-mode conflicts with scroll-margin] Richard Stallman
2004-06-14 12:13 ` Kim F. Storm [this message]
2004-06-14 17:41   ` Juri Linkov
2004-06-14 22:40     ` Kim F. Storm
2004-06-15 10:42       ` Kim F. Storm
2004-06-15 11:11         ` Juri Linkov
2004-06-15 10:40   ` Kim F. Storm
  -- strict thread matches above, loose matches on Subject: below --
2004-06-05 13:48 Richard Stallman

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=m33c4ytk13.fsf@kfs-l.imdomain.dk \
    --to=storm@cua.dk \
    --cc=az@ftc.ru \
    --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).