aboutsummaryrefslogtreecommitdiff
path: root/pd/src/g_rtext.c
diff options
context:
space:
mode:
authorGuenter Geiger <ggeiger@users.sourceforge.net>2004-02-22 16:00:02 +0000
committerGuenter Geiger <ggeiger@users.sourceforge.net>2004-02-22 16:00:02 +0000
commit4af95e6d1963e319ed6bb1681a332ad654bdd1ef (patch)
tree63d42c0e25f0ad84963a0a0c264a93251cbea7a8 /pd/src/g_rtext.c
parent74e28b058aaf629d94ad7d44a9add3062e89441d (diff)
merged in version 0.37-1test6
svn path=/trunk/; revision=1329
Diffstat (limited to 'pd/src/g_rtext.c')
-rw-r--r--pd/src/g_rtext.c13
1 files changed, 6 insertions, 7 deletions
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