* [az@ftc.ru: hl-line-mode conflicts with scroll-margin]
@ 2004-06-13 0:01 Richard Stallman
2004-06-14 12:13 ` Kim F. Storm
0 siblings, 1 reply; 8+ messages in thread
From: Richard Stallman @ 2004-06-13 0:01 UTC (permalink / raw)
[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?
------- Start of forwarded message -------
From: Eugeny Korekin <az@ftc.ru>
To: emacs-pretest-bug@gnu.org
Date: Wed, 2 Jun 2004 14:54:29 +0700 (NOVST)
X-OriginalArrivalTime: 02 Jun 2004 07:54:29.0011 (UTC)
FILETIME=[D5001630:01C44876]
Subject: hl-line-mode conflicts with scroll-margin
Sender: emacs-pretest-bug-bounces+rms=gnu.org@gnu.org
X-Spam-Status: No, hits=0.0 required=5.0
tests=none
version=2.55
X-Spam-Level:
X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp)
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)
In GNU Emacs 21.3.50.2 (i686-pc-linux-gnu, GTK+ Version 2.4.1)
of 2004-05-31 on reks.ftc.ru
configured using `configure '--with-gtk' '--without-debug''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: ru_RU.KOI8-R
value of $LC_CTYPE: ru_RU.KOI8-R
value of $LC_MESSAGES: C
value of $LC_MONETARY: ru_RU.KOI8-R
value of $LC_NUMERIC: ru_RU.KOI8-R
value of $LC_TIME: C
value of $LANG: ru_RU.KOI8-R
locale-coding-system: cyrillic-koi8
default-enable-multibyte-characters: t
Major mode: Emacs-Lisp
Minor modes in effect:
erc-button-mode: t
erc-ring-mode: t
erc-stamp-mode: t
erc-pcomplete-mode: t
erc-track-mode: t
erc-match-mode: t
eldoc-mode: t
iswitchb-mode: t
auto-compression-mode: t
auto-image-file-mode: t
show-paren-mode: t
desktop-save-mode: t
partial-completion-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
global-font-lock-mode: t
font-lock-mode: t
unify-8859-on-encoding-mode: t
size-indication-mode: t
column-number-mode: t
line-number-mode: t
Recent input:
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <menu-bar> <help-menu>
<report-emacs-bug>
Recent messages:
Generating summary...done
Auto-saving...
mwheel-scroll: Beginning of buffer [2 times]
nil
Wrote /home/az/elisp/misc-init.el
50 = ?2
t
50 = ?2
Global-Hl-Line mode disabled
Loading emacsbug (source)...done
_______________________________________________
Emacs-pretest-bug mailing list
Emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
------- End of forwarded message -------
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [az@ftc.ru: hl-line-mode conflicts with scroll-margin]
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
2004-06-14 17:41 ` Juri Linkov
2004-06-15 10:40 ` Kim F. Storm
0 siblings, 2 replies; 8+ messages in thread
From: Kim F. Storm @ 2004-06-14 12:13 UTC (permalink / raw)
Cc: az, emacs-devel
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [az@ftc.ru: hl-line-mode conflicts with scroll-margin]
2004-06-14 12:13 ` Kim F. Storm
@ 2004-06-14 17:41 ` Juri Linkov
2004-06-14 22:40 ` Kim F. Storm
2004-06-15 10:40 ` Kim F. Storm
1 sibling, 1 reply; 8+ messages in thread
From: Juri Linkov @ 2004-06-14 17:41 UTC (permalink / raw)
Cc: emacs-devel
storm@cua.dk (Kim F. Storm) writes:
> The following patch solves the problem.
Here is another related bug report for you :-)
If scroll-margin is not 0 and font-lock-mode is turned on, i.e.
(progn
(setq scroll-margin 5)
(global-font-lock-mode))
then after moving the cursor down until it reaches the fifth line from
the bottom of the window the cursor is placed in the center of the window
where it starts jumping forth and back: after 1 second it moves to the
end of the line, and after another 1 second moves to the beginning
of the following line.
This bug can be reproduced on GNU/Linux in Emacs versions starting
at least from 21.3.
--
Juri Linkov
http://www.jurta.org/emacs/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [az@ftc.ru: hl-line-mode conflicts with scroll-margin]
2004-06-14 17:41 ` Juri Linkov
@ 2004-06-14 22:40 ` Kim F. Storm
2004-06-15 10:42 ` Kim F. Storm
0 siblings, 1 reply; 8+ messages in thread
From: Kim F. Storm @ 2004-06-14 22:40 UTC (permalink / raw)
Cc: emacs-devel
Juri Linkov <juri@jurta.org> writes:
> storm@cua.dk (Kim F. Storm) writes:
> > The following patch solves the problem.
>
> Here is another related bug report for you :-)
>
> If scroll-margin is not 0 and font-lock-mode is turned on, i.e.
>
> (progn
> (setq scroll-margin 5)
> (global-font-lock-mode))
>
> then after moving the cursor down until it reaches the fifth line from
> the bottom of the window the cursor is placed in the center of the window
> where it starts jumping forth and back: after 1 second it moves to the
> end of the line, and after another 1 second moves to the beginning
> of the following line.
>
> This bug can be reproduced on GNU/Linux in Emacs versions starting
> at least from 21.3.
Ok, try this patch:
*** xdisp.c 30 May 2004 23:13:12 +0200 1.892
--- xdisp.c 15 Jun 2004 00:31:01 +0200
***************
*** 12542,12550 ****
position. */
if (pt_row)
{
! w->cursor.vpos -= MATRIX_ROW_VPOS (first_reusable_row,
! w->current_matrix);
! w->cursor.y -= first_reusable_row->y;
}
/* Scroll the display. */
--- 12542,12549 ----
position. */
if (pt_row)
{
! w->cursor.vpos -= nrows_scrolled;
! w->cursor.y -= first_reusable_row->y - start_row->y;
}
/* Scroll the display. */
***************
*** 12589,12594 ****
--- 12588,12616 ----
for (row -= nrows_scrolled; row < bottom_row; ++row)
row->enabled_p = 0;
+ /* Point may have moved to a different line, so we cannot assume that
+ the previous cursor position is valid; locate the correct row. */
+ if (pt_row)
+ {
+ for (row = MATRIX_ROW (w->current_matrix, w->cursor.vpos);
+ row < bottom_row && PT >= MATRIX_ROW_END_CHARPOS (row);
+ row++)
+ {
+ w->cursor.vpos++;
+ w->cursor.y = row->y;
+ }
+ if (row < bottom_row)
+ {
+ struct glyph *glyph = row->glyphs[TEXT_AREA] + w->cursor.hpos;
+ while (glyph->charpos < PT)
+ {
+ w->cursor.hpos++;
+ w->cursor.x += glyph->pixel_width;
+ glyph++;
+ }
+ }
+ }
+
/* Adjust window end. A null value of last_text_row means that
the window end is in reused rows which in turn means that
only its vpos can have changed. */
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [az@ftc.ru: hl-line-mode conflicts with scroll-margin]
2004-06-14 22:40 ` Kim F. Storm
@ 2004-06-15 10:42 ` Kim F. Storm
2004-06-15 11:11 ` Juri Linkov
0 siblings, 1 reply; 8+ messages in thread
From: Kim F. Storm @ 2004-06-15 10:42 UTC (permalink / raw)
Cc: emacs-devel
storm@cua.dk (Kim F. Storm) writes:
> Juri Linkov <juri@jurta.org> writes:
>
> > storm@cua.dk (Kim F. Storm) writes:
> > > The following patch solves the problem.
> >
> > Here is another related bug report for you :-)
> >
> > If scroll-margin is not 0 and font-lock-mode is turned on, i.e.
> >
> > (progn
> > (setq scroll-margin 5)
> > (global-font-lock-mode))
> >
> > then after moving the cursor down until it reaches the fifth line from
> > the bottom of the window the cursor is placed in the center of the window
> > where it starts jumping forth and back: after 1 second it moves to the
> > end of the line, and after another 1 second moves to the beginning
> > of the following line.
> >
> > This bug can be reproduced on GNU/Linux in Emacs versions starting
> > at least from 21.3.
>
>
> Ok, try this patch:
I have installed the patch.
I have also corrected scrolling at the top of the window when a header
line is present -- before, the header line counted as one line, so
the scroll margin seemed to be one less than the configured value.
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [az@ftc.ru: hl-line-mode conflicts with scroll-margin]
2004-06-15 10:42 ` Kim F. Storm
@ 2004-06-15 11:11 ` Juri Linkov
0 siblings, 0 replies; 8+ messages in thread
From: Juri Linkov @ 2004-06-15 11:11 UTC (permalink / raw)
Cc: emacs-devel
storm@cua.dk (Kim F. Storm) writes:
>> Juri Linkov <juri@jurta.org> writes:
>> > If scroll-margin is not 0 and font-lock-mode is turned on, i.e.
>> >
>> > (progn
>> > (setq scroll-margin 5)
>> > (global-font-lock-mode))
>> >
>> > then after moving the cursor down until it reaches the fifth line from
>> > the bottom of the window the cursor is placed in the center of the window
>> > where it starts jumping forth and back: after 1 second it moves to the
>> > end of the line, and after another 1 second moves to the beginning
>> > of the following line.
>> >
>> > This bug can be reproduced on GNU/Linux in Emacs versions starting
>> > at least from 21.3.
>>
>> Ok, try this patch:
>
> I have installed the patch.
It works fine. Thanks. You fix bugs at so high rate that you probably
don't need a bug tracker :-) [This is only a half-joke, of course.
An issue tracker is definitely needed for long-standing bugs that
can't be fixed immediately, in other words, when fixing a bug becomes
a serious issue].
--
Juri Linkov
http://www.jurta.org/emacs/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [az@ftc.ru: hl-line-mode conflicts with scroll-margin]
2004-06-14 12:13 ` Kim F. Storm
2004-06-14 17:41 ` Juri Linkov
@ 2004-06-15 10:40 ` Kim F. Storm
1 sibling, 0 replies; 8+ messages in thread
From: Kim F. Storm @ 2004-06-15 10:40 UTC (permalink / raw)
Cc: az, emacs-devel
storm@cua.dk (Kim F. Storm) writes:
> 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...
I have installed the patch.
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 8+ messages in thread
* [az@ftc.ru: hl-line-mode conflicts with scroll-margin]
@ 2004-06-05 13:48 Richard Stallman
0 siblings, 0 replies; 8+ messages in thread
From: Richard Stallman @ 2004-06-05 13:48 UTC (permalink / raw)
This could be a redisplay bug. Can someone who has
worked on redisplay take a look at it?
------- Start of forwarded message -------
From: Eugeny Korekin <az@ftc.ru>
To: emacs-pretest-bug@gnu.org
Date: Wed, 2 Jun 2004 14:54:29 +0700 (NOVST)
X-OriginalArrivalTime: 02 Jun 2004 07:54:29.0011 (UTC)
FILETIME=[D5001630:01C44876]
Subject: hl-line-mode conflicts with scroll-margin
Sender: emacs-pretest-bug-bounces+rms=gnu.org@gnu.org
X-Spam-Status: No, hits=0.0 required=5.0
tests=none
version=2.55
X-Spam-Level:
X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp)
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)
In GNU Emacs 21.3.50.2 (i686-pc-linux-gnu, GTK+ Version 2.4.1)
of 2004-05-31 on reks.ftc.ru
configured using `configure '--with-gtk' '--without-debug''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: ru_RU.KOI8-R
value of $LC_CTYPE: ru_RU.KOI8-R
value of $LC_MESSAGES: C
value of $LC_MONETARY: ru_RU.KOI8-R
value of $LC_NUMERIC: ru_RU.KOI8-R
value of $LC_TIME: C
value of $LANG: ru_RU.KOI8-R
locale-coding-system: cyrillic-koi8
default-enable-multibyte-characters: t
Major mode: Emacs-Lisp
Minor modes in effect:
erc-button-mode: t
erc-ring-mode: t
erc-stamp-mode: t
erc-pcomplete-mode: t
erc-track-mode: t
erc-match-mode: t
eldoc-mode: t
iswitchb-mode: t
auto-compression-mode: t
auto-image-file-mode: t
show-paren-mode: t
desktop-save-mode: t
partial-completion-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
global-font-lock-mode: t
font-lock-mode: t
unify-8859-on-encoding-mode: t
size-indication-mode: t
column-number-mode: t
line-number-mode: t
Recent input:
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <menu-bar> <help-menu>
<report-emacs-bug>
Recent messages:
Generating summary...done
Auto-saving...
mwheel-scroll: Beginning of buffer [2 times]
nil
Wrote /home/az/elisp/misc-init.el
50 = ?2
t
50 = ?2
Global-Hl-Line mode disabled
Loading emacsbug (source)...done
_______________________________________________
Emacs-pretest-bug mailing list
Emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
------- End of forwarded message -------
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2004-06-15 11:11 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
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).