summaryrefslogtreecommitdiffstats
path: root/generic/tkPanedWindow.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkPanedWindow.c')
-rw-r--r--generic/tkPanedWindow.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c
index a28f7e8..3a1fa98 100644
--- a/generic/tkPanedWindow.c
+++ b/generic/tkPanedWindow.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkPanedWindow.c,v 1.11 2003/02/20 21:08:30 pspjuth Exp $
+ * RCS: @(#) $Id: tkPanedWindow.c,v 1.12 2003/02/21 01:57:51 hobbs Exp $
*/
#include "tkPort.h"
@@ -203,8 +203,12 @@ static char * ComputeSlotAddress _ANSI_ARGS_((char *recordPtr, int offset));
static int PanedWindowIdentifyCoords _ANSI_ARGS_((PanedWindow *pwPtr,
Tcl_Interp *interp, int x, int y));
+/*
+ * Sashes are between panes only, so there is one less sash than slaves
+ */
+
#define ValidSashIndex(pwPtr, sash) \
- (((sash) >= 0) && ((sash) < (pwPtr)->numSlaves))
+ (((sash) >= 0) && ((sash) < ((pwPtr)->numSlaves-1)))
static Tk_GeomMgr panedWindowMgrType = {
"panedwindow", /* name */
@@ -2240,7 +2244,6 @@ MoveSash(pwPtr, sash, diff)
* Growing the pane, at the expense of panes to the right.
*/
-
/*
* First check that moving the sash the requested distance will not
* leave it off the screen. If necessary, clip the requested diff