[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r108872: * window.c (set_window_hscro
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r108872: * window.c (set_window_hscroll): Revert the 100000 hscroll limit. |
Date: |
Wed, 04 Jul 2012 10:58:55 -0700 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 108872
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Wed 2012-07-04 10:58:55 -0700
message:
* window.c (set_window_hscroll): Revert the 100000 hscroll limit.
This should be fixed in a better way; see Eli Zaretskii in
<http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00088.html>.
(HSCROLL_MAX): Remove; this is now internal to set_window_hscroll.
modified:
src/ChangeLog
src/window.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2012-07-04 17:11:11 +0000
+++ b/src/ChangeLog 2012-07-04 17:58:55 +0000
@@ -1,5 +1,10 @@
2012-07-04 Paul Eggert <address@hidden>
+ * window.c (set_window_hscroll): Revert the 100000 hscroll limit.
+ This should be fixed in a better way; see Eli Zaretskii in
+ <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00088.html>.
+ (HSCROLL_MAX): Remove; this is now internal to set_window_hscroll.
+
* fileio.c (time_error_value): Rename from special_mtime.
The old name's problems were noted by Eli Zaretskii in
<http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00087.html>.
=== modified file 'src/window.c'
--- a/src/window.c 2012-07-04 06:15:31 +0000
+++ b/src/window.c 2012-07-04 17:58:55 +0000
@@ -51,11 +51,6 @@
#include "nsterm.h"
#endif
-/* Horizontal scrolling has problems with large scroll amounts.
- It's too slow with long lines, and even with small lines the
- display can be messed up. Impose a reasonable maximum. */
-enum { HSCROLL_MAX = 100000 };
-
Lisp_Object Qwindowp, Qwindow_live_p;
static Lisp_Object Qwindow_configuration_p, Qrecord_window_buffer;
static Lisp_Object Qwindow_deletable_p, Qdelete_window, Qdisplay_buffer;
@@ -680,7 +675,14 @@
static Lisp_Object
set_window_hscroll (struct window *w, EMACS_INT hscroll)
{
- int new_hscroll = clip_to_bounds (0, hscroll, HSCROLL_MAX);
+ /* Horizontal scrolling has problems with large scroll amounts.
+ It's too slow with long lines, and even with small lines the
+ display can be messed up. For now, though, impose only the limits
+ required by the internal representation: horizontal scrolling must
+ fit in fixnum (since it's visible to Elisp) and into ptrdiff_t
+ (since it's stored in a ptrdiff_t). */
+ ptrdiff_t hscroll_max = min (MOST_POSITIVE_FIXNUM, PTRDIFF_MAX);
+ ptrdiff_t new_hscroll = clip_to_bounds (0, hscroll, hscroll_max);
/* Prevent redisplay shortcuts when changing the hscroll. */
if (w->hscroll != new_hscroll)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r108872: * window.c (set_window_hscroll): Revert the 100000 hscroll limit.,
Paul Eggert <=