[Top][All Lists]
[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.
- Re: ptrdiff_t misuse [was :Re: (empty)],
Paul Eggert <=
- Re: ptrdiff_t misuse [was :Re: (empty)], Eli Zaretskii, 2012/07/04
- Re: ptrdiff_t misuse [was :Re: (empty)], Paul Eggert, 2012/07/04
- Re: ptrdiff_t misuse [was :Re: (empty)], Eli Zaretskii, 2012/07/05
- Re: ptrdiff_t misuse [was :Re: (empty)], Eli Zaretskii, 2012/07/05
- Re: ptrdiff_t misuse [was :Re: (empty)], Paul Eggert, 2012/07/05
- Re: ptrdiff_t misuse [was :Re: (empty)], Eli Zaretskii, 2012/07/06
- Re: ptrdiff_t misuse [was :Re: (empty)], Paul Eggert, 2012/07/06
- Re: ptrdiff_t misuse, Eli Zaretskii, 2012/07/06
- Re: ptrdiff_t misuse, Paul Eggert, 2012/07/06
- Re: ptrdiff_t misuse, Stefan Monnier, 2012/07/06