Tk Source Code

View Ticket
Login
Ticket UUID: 1169429
Title: insertofftime 0 should not hide the cursor in text widgets
Type: Bug Version: None
Submitter: fvogel Created on: 2005-03-23 21:17:17
Subsystem: 18. [text] Assigned To: hobbs
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2014-02-19 21:42:03
Resolution: Fixed Closed By: vincentdarley
    Closed on: 2005-04-04 21:59:01
Description:
Background:
A text widget with a blinking cursor.

Issue:
After the widget is created, using -insertofftime 0 to stop 
the cursor blinking stops it in the state the cursor is at 
the time the above command is processed. The cursor 
can therefore be off, depending on when insertofftime 0 
was processed.

What it should be (IMHO):
Using -insertofftime 0 should stop blinking the cursor 
and always display it.

To reproduce the issue:
In a wish session, type:
text .t -insertofftime 500 -insertontime 500
pack .t
.t insert insert "This is a blinking cursor test.     "
bind Text <Shift-Button-3> { %W configure -
insertofftime   0 }
bind Text <Button-3> { %W configure -insertofftime 500 }
focus .t

Now play with mouse button 3 and with the shift key to 
stop the blinking and start it again.

You can easily show that the cursor stops blinking in 
the state it is in when tk processes the insertofftime 0.

If you make it stop blinking when it is on, then it 
remains visible in the widget, otherwise it is hidden and 
does not reappear until blinking is restored using button-
3 (try typing text in the widget, or click button1 for 
instance).
User Comments: fvogelnew1 added on 2005-12-02 03:19:21:
Logged In: YES 
user_id=1245417

Hi, 
 
Could you please backport your fix to the 8.4.11 branch so 
that it will be included in the upcoming 8.4.12? 
 
I really need this fix. 
 
Thanks a lot, 
Francois

fvogelnew1 added on 2005-04-06 01:56:34:
Logged In: YES 
user_id=1245417

Sorry, I can see it now.

fvogelnew1 added on 2005-04-05 05:22:24:
Logged In: YES 
user_id=1245417

Many thanks for that.

However, I can't see any change in the cvs file tkText.c. 
Strange...

vincentdarley added on 2005-04-05 04:59:01:
Logged In: YES 
user_id=32170

Committed fix to cvs head.

fvogelnew1 added on 2005-04-01 02:44:24:
Logged In: YES 
user_id=1245417

Downloaded the full tcl and tk cvs version, compiled (Win 
XP), applied your patch, and...

...it works for me, thanks!!

Will we see this included in the cvs version? What's the 
process now?

vincentdarley added on 2005-04-01 00:37:51:

File Added - 127970: textBlink.diff

Logged In: YES 
user_id=32170

Please test the attached patch.  Should fix the problem.

Attachments: