diff options
| author | Paul Eggert | 2012-07-04 10:58:55 -0700 |
|---|---|---|
| committer | Paul Eggert | 2012-07-04 10:58:55 -0700 |
| commit | 4e71fd8903e237cd2b45797bb1315f2699e1569e (patch) | |
| tree | ed69ae887c429193f4ec1b334a866140ca32877b /src | |
| parent | 0566bc954097aae81a0efda950c4567be3139c23 (diff) | |
| download | emacs-4e71fd8903e237cd2b45797bb1315f2699e1569e.tar.gz emacs-4e71fd8903e237cd2b45797bb1315f2699e1569e.zip | |
* 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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/window.c | 14 |
2 files changed, 13 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 6493d9eab05..d55b2474717 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,10 @@ | |||
| 1 | 2012-07-04 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2012-07-04 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | * window.c (set_window_hscroll): Revert the 100000 hscroll limit. | ||
| 4 | This should be fixed in a better way; see Eli Zaretskii in | ||
| 5 | <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00088.html>. | ||
| 6 | (HSCROLL_MAX): Remove; this is now internal to set_window_hscroll. | ||
| 7 | |||
| 3 | * fileio.c (time_error_value): Rename from special_mtime. | 8 | * fileio.c (time_error_value): Rename from special_mtime. |
| 4 | The old name's problems were noted by Eli Zaretskii in | 9 | The old name's problems were noted by Eli Zaretskii in |
| 5 | <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00087.html>. | 10 | <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00087.html>. |
diff --git a/src/window.c b/src/window.c index a4369655640..229035fe81e 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -51,11 +51,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 51 | #include "nsterm.h" | 51 | #include "nsterm.h" |
| 52 | #endif | 52 | #endif |
| 53 | 53 | ||
| 54 | /* Horizontal scrolling has problems with large scroll amounts. | ||
| 55 | It's too slow with long lines, and even with small lines the | ||
| 56 | display can be messed up. Impose a reasonable maximum. */ | ||
| 57 | enum { HSCROLL_MAX = 100000 }; | ||
| 58 | |||
| 59 | Lisp_Object Qwindowp, Qwindow_live_p; | 54 | Lisp_Object Qwindowp, Qwindow_live_p; |
| 60 | static Lisp_Object Qwindow_configuration_p, Qrecord_window_buffer; | 55 | static Lisp_Object Qwindow_configuration_p, Qrecord_window_buffer; |
| 61 | static Lisp_Object Qwindow_deletable_p, Qdelete_window, Qdisplay_buffer; | 56 | static Lisp_Object Qwindow_deletable_p, Qdelete_window, Qdisplay_buffer; |
| @@ -680,7 +675,14 @@ WINDOW must be a live window and defaults to the selected one. */) | |||
| 680 | static Lisp_Object | 675 | static Lisp_Object |
| 681 | set_window_hscroll (struct window *w, EMACS_INT hscroll) | 676 | set_window_hscroll (struct window *w, EMACS_INT hscroll) |
| 682 | { | 677 | { |
| 683 | int new_hscroll = clip_to_bounds (0, hscroll, HSCROLL_MAX); | 678 | /* Horizontal scrolling has problems with large scroll amounts. |
| 679 | It's too slow with long lines, and even with small lines the | ||
| 680 | display can be messed up. For now, though, impose only the limits | ||
| 681 | required by the internal representation: horizontal scrolling must | ||
| 682 | fit in fixnum (since it's visible to Elisp) and into ptrdiff_t | ||
| 683 | (since it's stored in a ptrdiff_t). */ | ||
| 684 | ptrdiff_t hscroll_max = min (MOST_POSITIVE_FIXNUM, PTRDIFF_MAX); | ||
| 685 | ptrdiff_t new_hscroll = clip_to_bounds (0, hscroll, hscroll_max); | ||
| 684 | 686 | ||
| 685 | /* Prevent redisplay shortcuts when changing the hscroll. */ | 687 | /* Prevent redisplay shortcuts when changing the hscroll. */ |
| 686 | if (w->hscroll != new_hscroll) | 688 | if (w->hscroll != new_hscroll) |