emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ptrdiff_t misuse [was :Re: (empty)]


From: Paul Eggert
Subject: Re: ptrdiff_t misuse [was :Re: (empty)]
Date: Tue, 03 Jul 2012 23:25:26 -0700
User-agent: Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20120615 Thunderbird/13.0.1

On 06/30/2012 07:23 AM, Stefan Monnier wrote:
> No, the problem is long lines.

There's also a problem even if lines are short.
I ran Emacs without the patch, on files with
only short lines, and attempted large horizontal
scroll values (say, most-positive-fixnum minus 100).
The screen would mess up.  Sometimes even after I
scrolled back to the left margin, there would be scroll
indicators in the left column.  Sometimes there would
be stray characters on the screen.

To work around this I pushed a patch (trunk bzr 108856)
that arbitrarily ceilings the hscroll value at 100000.
I didn't observe any problems with hscroll values less
than that, though I suppose the exact safe region may
vary depending on font sizes or whatnot.

This patch removes the PTRDIFF_MAX checks that
prompted this thread, as they're no longer needed.

This patch is independent of whether hscroll values
are stored as ptrdiff_t or EMACS_INT or int, so it
shouldn't affect Dmitry's work-in-progress that
would change the number of bits in an hscroll value.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]