From 4af95e6d1963e319ed6bb1681a332ad654bdd1ef Mon Sep 17 00:00:00 2001 From: Guenter Geiger Date: Sun, 22 Feb 2004 16:00:02 +0000 Subject: merged in version 0.37-1test6 svn path=/trunk/; revision=1329 --- pd/src/g_rtext.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'pd/src/g_rtext.c') diff --git a/pd/src/g_rtext.c b/pd/src/g_rtext.c index aeeb5dfd..d44f30fa 100644 --- a/pd/src/g_rtext.c +++ b/pd/src/g_rtext.c @@ -137,6 +137,11 @@ static int lastone(char *s, int c, int n) #define UPBUFSIZE 4000 #define BOXWIDTH 60 +/* Older (pre-8.3.4) TCL versions handle text selection differently; this +flag is set from the GUI if this happens. LATER take this out: early 2006? */ + +extern int sys_oldtclversion; + static void rtext_senditup(t_rtext *x, int action, int *widthp, int *heightp, int *indexp) { @@ -229,13 +234,7 @@ static void rtext_senditup(t_rtext *x, int action, int *widthp, int *heightp, sys_vgui(".x%x.c select from %s %d\n", canvas, x->x_tag, x->x_selstart); sys_vgui(".x%x.c select to %s %d\n", canvas, - x->x_tag, x->x_selend -#if defined (MSW) || defined(MACOSX) - /* Why is linux selecting text differently from MSW and OSX??? - Just adjust it here... LATER revisit this one */ - -1 -#endif - ); + x->x_tag, x->x_selend + (sys_oldtclversion ? 0 : -1)); sys_vgui(".x%x.c focus \"\"\n", canvas); } else -- cgit v1.2.1