unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Buffer Boundary Problem
@ 2004-01-31 23:14 Vinicius Jose Latorre
  2004-02-01  0:13 ` Miles Bader
  2004-02-01 12:26 ` Jan D.
  0 siblings, 2 replies; 12+ messages in thread
From: Vinicius Jose Latorre @ 2004-01-31 23:14 UTC (permalink / raw)


Hi,


I'm using:

(setq default-indicate-buffer-boundaries t)

And I'm liking the buffer boundaries indication.

But it has a problem, suppose you're visiting a file bigger than the 
window in
Emacs.  So, the vertical scroll bar looks like:
    _
   |^|
   | |
   | |
   | |
   | |
   | |
   |v|
    -

Now, type several C-n (next-line) until the window scrolls up.

The vertical scroll bar now looks like:
    _
   |^|
   | |
   | |
   |v|
   | |
   | |
   |v|
    -

Or, sometimes, like:
    _
   | |
   | |
   | |
   |v|
   | |
   | |
   |v|
    -

I've just downloaded Emacs (via cvs) and bootstrap it today (2004-jan-31).

Am I doing something wrong?


Vinicius

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Buffer Boundary Problem
  2004-01-31 23:14 Buffer Boundary Problem Vinicius Jose Latorre
@ 2004-02-01  0:13 ` Miles Bader
  2004-02-01  0:36   ` Jan D.
  2004-02-01  1:04   ` Vinicius Jose Latorre
  2004-02-01 12:26 ` Jan D.
  1 sibling, 2 replies; 12+ messages in thread
From: Miles Bader @ 2004-02-01  0:13 UTC (permalink / raw)
  Cc: emacs-devel

On Sat, Jan 31, 2004 at 09:14:27PM -0200, Vinicius Jose Latorre wrote:
> But it has a problem, suppose you're visiting a file bigger than the window
> in Emacs.  So, the vertical scroll bar looks like:
...
> Now, type several C-n (next-line) until the window scrolls up.
> The vertical scroll bar now looks like:

By `it' I presume you mean the scrollbars have a problem, and that you're
using GTK scrollbars.

If so, the problem is that the GTK scrollbars are missing some functionality
that emacs needs to work optimally, so as a work-around emacs scrollbars are
little funny near the end of a buffer.  Basically there's some extra space
at the end so you can use the scrollbar to scroll the last line to the top
of the window.

[While I understand the reason for this problem, I wonder if it might be
useful to have a variable which controls that behavior -- by setting it to a
different value, you could make scrollbars display `correctly' but lose the
ability to scroll the last line to the window top... is this possible?]

-Miles
-- 
Somebody has to do something, and it's just incredibly pathetic that it
has to be us.  -- Jerry Garcia

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Buffer Boundary Problem
  2004-02-01  0:13 ` Miles Bader
@ 2004-02-01  0:36   ` Jan D.
  2004-02-01  1:06     ` Vinicius Jose Latorre
  2004-02-01  1:04   ` Vinicius Jose Latorre
  1 sibling, 1 reply; 12+ messages in thread
From: Jan D. @ 2004-02-01  0:36 UTC (permalink / raw)
  Cc: Vinicius Jose Latorre, emacs-devel

> [While I understand the reason for this problem, I wonder if it might 
> be
> useful to have a variable which controls that behavior -- by setting 
> it to a
> different value, you could make scrollbars display `correctly' but 
> lose the
> ability to scroll the last line to the window top... is this possible?]

Yes, in fact it is trivial, since it is the normal behaviour that GTK
expects.  Wan't me to implement that?

	Jan D.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Buffer Boundary Problem
  2004-02-01  0:13 ` Miles Bader
  2004-02-01  0:36   ` Jan D.
@ 2004-02-01  1:04   ` Vinicius Jose Latorre
  2004-02-01 11:52     ` Matt Hodges
  1 sibling, 1 reply; 12+ messages in thread
From: Vinicius Jose Latorre @ 2004-02-01  1:04 UTC (permalink / raw)
  Cc: emacs-devel

Miles Bader wrote:

 >On Sat, Jan 31, 2004 at 09:14:27PM -0200, Vinicius Jose Latorre wrote:
 >
 >>But it has a problem, suppose you're visiting a file bigger than the 
window
 >>in Emacs.  So, the vertical scroll bar looks like:
 >
 >...
 >
 >>Now, type several C-n (next-line) until the window scrolls up.
 >>The vertical scroll bar now looks like:
 >
 >
 >By `it' I presume you mean the scrollbars have a problem, and that you're
 >using GTK scrollbars.

Yes, the vertical scrollbar.  And, also, I'm using GTK.


Vinicius

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Buffer Boundary Problem
  2004-02-01  0:36   ` Jan D.
@ 2004-02-01  1:06     ` Vinicius Jose Latorre
  0 siblings, 0 replies; 12+ messages in thread
From: Vinicius Jose Latorre @ 2004-02-01  1:06 UTC (permalink / raw)
  Cc: emacs-devel, Miles Bader

 > > [While I understand the reason for this problem, I wonder if it 
might be
 > > useful to have a variable which controls that behavior -- by 
setting it to a
 > > different value, you could make scrollbars display `correctly' but 
lose the
 > > ability to scroll the last line to the window top... is this possible?]
 >
 >
 > Yes, in fact it is trivial, since it is the normal behaviour that GTK
 > expects.  Wan't me to implement that?

Well, I'll be pleased if you could implement it.

Thanks,

Vinicius

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Buffer Boundary Problem
  2004-02-01  1:04   ` Vinicius Jose Latorre
@ 2004-02-01 11:52     ` Matt Hodges
  2004-02-01 12:30       ` Jan D.
                         ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Matt Hodges @ 2004-02-01 11:52 UTC (permalink / raw)


>>>>> Vinicius Jose Latorre writes:

 > >By `it' I presume you mean the scrollbars have a problem, and that
 > >you're using GTK scrollbars.

 > Yes, the vertical scrollbar. And, also, I'm using GTK.

I tried what you described in your original post, and thought you were
talking about the glyphs in the fringe. I also see either two down
arrows, or sometimes two down and one up; this changes to one up arrow
and one down arrow with C-l, which is what I expect to see.

This seems to be the case with or without scrollbars, at least for a
GTK build.

Matt

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Buffer Boundary Problem
  2004-01-31 23:14 Buffer Boundary Problem Vinicius Jose Latorre
  2004-02-01  0:13 ` Miles Bader
@ 2004-02-01 12:26 ` Jan D.
  1 sibling, 0 replies; 12+ messages in thread
From: Jan D. @ 2004-02-01 12:26 UTC (permalink / raw)
  Cc: emacs-devel


Hello.

Please send some more information about your setup, are you using GTK, Motif, 
or whatever, native scrollbars or not, if you are using GTK, what theme, does 
the problem only show with default-indicate-buffer-boundaries set to t.

I can not reproduce this.

	Jan D.

Vinicius Jose Latorre wrote:

> I'm using:
> 
> (setq default-indicate-buffer-boundaries t)
> 
> And I'm liking the buffer boundaries indication.
> 
> But it has a problem, suppose you're visiting a file bigger than the 
> window in
> Emacs.  So, the vertical scroll bar looks like:
>    _
>   |^|
>   | |
>   | |
>   | |
>   | |
>   | |
>   |v|
>    -
> 
> Now, type several C-n (next-line) until the window scrolls up.
> 
> The vertical scroll bar now looks like:
>    _
>   |^|
>   | |
>   | |
>   |v|
>   | |
>   | |
>   |v|
>    -
> 
> Or, sometimes, like:
>    _
>   | |
>   | |
>   | |
>   |v|
>   | |
>   | |
>   |v|
>    -
> 
> I've just downloaded Emacs (via cvs) and bootstrap it today (2004-jan-31).
> 
> Am I doing something wrong?
> 
> 
> Vinicius
> 
> 
> 
> _______________________________________________
> Emacs-devel mailing list
> Emacs-devel@gnu.org
> http://mail.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Buffer Boundary Problem
  2004-02-01 11:52     ` Matt Hodges
@ 2004-02-01 12:30       ` Jan D.
  2004-02-01 12:54         ` Jan D.
  2004-02-01 21:32       ` Vinicius Jose Latorre
  2004-02-01 21:38       ` Kim F. Storm
  2 siblings, 1 reply; 12+ messages in thread
From: Jan D. @ 2004-02-01 12:30 UTC (permalink / raw)
  Cc: emacs-devel

Matt Hodges wrote:
>>>>>>Vinicius Jose Latorre writes:
> 
> 
>  > >By `it' I presume you mean the scrollbars have a problem, and that
>  > >you're using GTK scrollbars.
> 
>  > Yes, the vertical scrollbar. And, also, I'm using GTK.
> 
> I tried what you described in your original post, and thought you were
> talking about the glyphs in the fringe. I also see either two down
> arrows, or sometimes two down and one up; this changes to one up arrow
> and one down arrow with C-l, which is what I expect to see.
> 
> This seems to be the case with or without scrollbars, at least for a
> GTK build.

Can you elaborate?  What are those arrows if it also happens without 
scrollbars?  Not scrollbar arrows, but what?

	Jan D.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Buffer Boundary Problem
  2004-02-01 12:30       ` Jan D.
@ 2004-02-01 12:54         ` Jan D.
  2004-02-02  9:46           ` Kim F. Storm
  0 siblings, 1 reply; 12+ messages in thread
From: Jan D. @ 2004-02-01 12:54 UTC (permalink / raw)
  Cc: Matt Hodges, emacs-devel

Jan D. wrote:
> Matt Hodges wrote:
> 
>>>>>>> Vinicius Jose Latorre writes:
>>
>>
>>
>>  > >By `it' I presume you mean the scrollbars have a problem, and that
>>  > >you're using GTK scrollbars.
>>
>>  > Yes, the vertical scrollbar. And, also, I'm using GTK.
>>
>> I tried what you described in your original post, and thought you were
>> talking about the glyphs in the fringe. I also see either two down
>> arrows, or sometimes two down and one up; this changes to one up arrow
>> and one down arrow with C-l, which is what I expect to see.
>>
>> This seems to be the case with or without scrollbars, at least for a
>> GTK build.
> 
> 
> Can you elaborate?  What are those arrows if it also happens without 
> scrollbars?  Not scrollbar arrows, but what?


Oh, now I get it.  Its the arrows in the fringes.  I didn't even see them 
first.  Anyway, it is unrelated to scrollbars, I see the same effect for Motif, 
Lesstif, Lucid and Xaw(3d) scroll bars.   However, I can not find any code that 
clear the fringes, just draws, so it is not surprising that you get an arrow in 
the middle sometimes.  It is the arrow that was at the bottom that has been 
moved up, and since fringes are not cleared before redrawn, it stays.

BTW, how come you can do C-h v default-indicate-buffer-boundaries, but not M-x 
set-variable default-indicate-buffer-boundaries?

	Jan D.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Buffer Boundary Problem
  2004-02-01 11:52     ` Matt Hodges
  2004-02-01 12:30       ` Jan D.
@ 2004-02-01 21:32       ` Vinicius Jose Latorre
  2004-02-01 21:38       ` Kim F. Storm
  2 siblings, 0 replies; 12+ messages in thread
From: Vinicius Jose Latorre @ 2004-02-01 21:32 UTC (permalink / raw)
  Cc: emacs-devel

 >  > >By `it' I presume you mean the scrollbars have a problem, and that
 >  > >you're using GTK scrollbars.
 >
 >  > Yes, the vertical scrollbar. And, also, I'm using GTK.
 >
 > I tried what you described in your original post, and thought you were
 > talking about the glyphs in the fringe. I also see either two down
 > arrows, or sometimes two down and one up; this changes to one up arrow
 > and one down arrow with C-l, which is what I expect to see.

The problem seems to happen only with C-n, with C-l, C-v, M-v and C-p the
glyphs are ok.


Vinicius

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Buffer Boundary Problem
  2004-02-01 11:52     ` Matt Hodges
  2004-02-01 12:30       ` Jan D.
  2004-02-01 21:32       ` Vinicius Jose Latorre
@ 2004-02-01 21:38       ` Kim F. Storm
  2 siblings, 0 replies; 12+ messages in thread
From: Kim F. Storm @ 2004-02-01 21:38 UTC (permalink / raw)
  Cc: emacs-devel

Matt Hodges <matt@tc.bham.ac.uk> writes:

> >>>>> Vinicius Jose Latorre writes:
> 
>  > >By `it' I presume you mean the scrollbars have a problem, and that
>  > >you're using GTK scrollbars.
> 
>  > Yes, the vertical scrollbar. And, also, I'm using GTK.
> 
> I tried what you described in your original post, and thought you were
> talking about the glyphs in the fringe. I also see either two down
> arrows, or sometimes two down and one up; this changes to one up arrow
> and one down arrow with C-l, which is what I expect to see.
> 

I'm working on a fix for the "duplicate up/down arrow problem".

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Buffer Boundary Problem
  2004-02-01 12:54         ` Jan D.
@ 2004-02-02  9:46           ` Kim F. Storm
  0 siblings, 0 replies; 12+ messages in thread
From: Kim F. Storm @ 2004-02-02  9:46 UTC (permalink / raw)
  Cc: Matt Hodges, emacs-devel

"Jan D." <jan.h.d@swipnet.se> writes:

> Oh, now I get it.  Its the arrows in the fringes.  I didn't even see
> them first.  Anyway, it is unrelated to scrollbars, I see the same
> effect for Motif, Lesstif, Lucid and Xaw(3d) scroll bars.   However, I
> can not find any code that clear the fringes, just draws, so it is not
> surprising that you get an arrow in the middle sometimes.  It is the
> arrow that was at the bottom that has been moved up, and since fringes
> are not cleared before redrawn, it stays.

It is true that fringes are not cleared before they are redrawn, as
the redisplay code tries to minimize the amount of redrawing -- so it
actually tries to remember which bitmaps are currently in the fringe
and only delete them if they are no longer needed at a certain
position.

The problem with the extra arrows is that some scrolling operations
work directly on the existing glyph matrix, so extra care is needed to
clean-up the fringe bitmaps that are scrolled with the text.

Since there are several such optimizations in the redisplay code, the
fringe redisplay code also need to be aware of those optimizations.
Currently there are some corner cases which it fails to handle.

++kfs

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2004-02-02  9:46 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-31 23:14 Buffer Boundary Problem Vinicius Jose Latorre
2004-02-01  0:13 ` Miles Bader
2004-02-01  0:36   ` Jan D.
2004-02-01  1:06     ` Vinicius Jose Latorre
2004-02-01  1:04   ` Vinicius Jose Latorre
2004-02-01 11:52     ` Matt Hodges
2004-02-01 12:30       ` Jan D.
2004-02-01 12:54         ` Jan D.
2004-02-02  9:46           ` Kim F. Storm
2004-02-01 21:32       ` Vinicius Jose Latorre
2004-02-01 21:38       ` Kim F. Storm
2004-02-01 12:26 ` Jan D.

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).