diff src/scrollbar.c @ 227:0e522484dd2a r20-5b12

Import from CVS: tag r20-5b12
author cvs
date Mon, 13 Aug 2007 10:12:37 +0200
parents 12579d965149
children c5d627a313b1
line wrap: on
line diff
--- a/src/scrollbar.c	Mon Aug 13 10:11:42 2007 +0200
+++ b/src/scrollbar.c	Mon Aug 13 10:12:37 2007 +0200
@@ -858,9 +858,11 @@
     hscroll = XINT (value);
 
   /* Can't allow this out of set-window-hscroll's acceptable range. */
+  /* #### What hell on the earth this code limits scroll size to the
+     machine-dependant SHORT size? -- kkm */
   if (hscroll < 0)
     hscroll = 0;
-  else if (hscroll >= (1 << (SHORTBITS - 1)))
+  else if (hscroll >= (1 << (SHORTBITS - 1)) - 1)
     hscroll = (1 << (SHORTBITS - 1)) - 1;
 
   if (hscroll != w->hscroll)