Repository navigation
Closed
Labels
Description
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee = 'https://github.com/terryjreedy'
closed_at = <Date 2020-07-23.08:20:12.743>
created_at = <Date 2008-12-11.08:05:53.196>
labels = ['expert-IDLE', 'type-feature', '3.10']
title = 'IDLE: add cursor noblink option'
updated_at = <Date 2020-07-23.08:20:12.742>
user = 'https://github.com/mark-summerfield'bugs.python.org fields:
activity = <Date 2020-07-23.08:20:12.742>
actor = 'terry.reedy'
assignee = 'terry.reedy'
closed = True
closed_date = <Date 2020-07-23.08:20:12.743>
closer = 'terry.reedy'
components = ['IDLE']
creation = <Date 2008-12-11.08:05:53.196>
creator = 'mark'
dependencies = []
files = ['13454', '29787']
hgrepos = []
issue_num = 4630
keywords = ['patch']
message_count = 24.0
messages = ['77598', '77720', '84056', '84061', '84073', '84074', '84285', '84366', '84371', '84522', '150937', '151045', '186589', '186611', '286494', '355521', '356516', '356517', '356518', '356520', '356521', '374122', '374125', '374128']
nosy_count = 10.0
nosy_names = ['terry.reedy', 'donmez', 'mark', 'gpolo', 'roger.serwy', 'decaf', 'Todd.Rovito', 'bughunter2', 'ZackerySpytz', 'miss-islington']
pr_nums = ['16960', '17141', '17142', '21594', '21598', '21599']
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue4630'
versions = ['Python 3.10']
Activity
mark-summerfield commentedon Dec 11, 2008
IDLE's cursor blinks with Python 3.0 on Linux.
But it shouldn't (and doesn't for prior versions) because in my
.Xdefaults file I have the line:
*insertOffTime: 0
Now I have to manually edit idlelib/EditorWindow.py to stop the cursor
from blinking.
(I also have to do this on Windows because IDLE ignores the blink rate
set in the control panel.)
I am one of a minority of people who cannot work with blinking cursors.
I hope that at the least IDLE will get an option to switch it off.
mark-summerfield commentedon Dec 13, 2008
Although I stand by my criticism of IDLE not offering the option of
switching off cursor blink, I've now discovered that the problem was
with Fedora 10 no longer executing xrdb .Xdefaults; once I added that
line to my .bash_profile the cursor blinking stopped.
However, that is no help to people using Windows for whom the only
solution is to manually edit the EditorWindow.py file every time they
install a new version of Python.
decaf commentedon Mar 24, 2009
Would you please share that code with us.
mark-summerfield commentedon Mar 24, 2009
Py2.6: idlelib/EditorWindow.py
change line 110 from: width=self.width,
to: width=self.width, insertofftime=0,
Py3.0
apply the same change to line 112
This will switch off cursor blink (and annoy people who want cursor
blink). So really instead of setting it to 0 you should set it to a
variable. On Windows the Win32 API has a function you can call to find
out the user's preferred blink rate and you can use that. On Mac OS X
there's no such thing so you would need to add an option to IDLE's
configuration dialog. On Linux the .Xdefaults file should be read and
*insertOffTime respected. But since for Mac you have to add it to the
configuration dialog, it might just be easier to just do that for all
platform a simple [ ] blinking cursor check box would suffice.
decaf commentedon Mar 24, 2009
Thank you very much. It was a kind of chinese torture.
mark-summerfield commentedon Mar 24, 2009
Yes, blinking cursors are torture for me too. Fortunately you can switch
them off globally in Windows, and in most cases on Linux (which is what
I use). But not on Mac OS X, and not it seems for Java apps. This site
has some tips: http://www.jurta.org/en/prog/noblink
gpolo commentedon Mar 27, 2009
Maybe we can agree on the feature being added ? I don't see much use for
controlling how much time the insertion cursor is on and how much time
it is off, but maybe just choosing between blink and no-blink would be
good to have. I would prefer to just get an option inside the "General"
tab that would affect the Text widget creation, instead of depending on
how each platform changes the behaviour.
I personally didn't have any issue with seeing the cursor blinking (I
think I never watched it blinking carefully), but now that you say this
it does annoy me if I watch it :)
mark-summerfield commentedon Mar 29, 2009
I agree that control of the blink _rate_ isn't needed. I would certainly
welcome a "[X] blinking cursor" checkbox that defaulted to being checked
so that existing behaviour is unchanged, but at the same time offering
an easier solution (i.e., no blinking if the user unchecks & of course
saving and restoring this setting with the other IDLE settings) for
those of us who can't work with cursor blink instead of forcing us to
edit EditWindow.py for every version of Python we install on all our
partitions & machines.
gpolo commentedon Mar 29, 2009
Here is a patch.
But I'm not feeling comfortable with the option "display":
Cursor blink ( ) No blink ( ) Blink
Those are radiobuttons. If I opted for a checkbutton then it would be
different from everything on the "General" config, still..
mark-summerfield commentedon Mar 30, 2009
I think a checkbox would be better:
[X] Blinking cursor
or
[X] Cursor blink
but if you use radio buttons you could have:
Cursor blink (*) On ( ) Off
bughunter2 commentedon Jan 9, 2012
I, too, would like to see this as an option in IDLE, as I also find blinking cursors distracting.
I can confirm that tkinter.Text's "insertofftime" option works on Windows as well, so the proposed patch should work on Windows.
terryjreedy commentedon Jan 11, 2012
The idea and design look good to me. I will test on Windows when I am able to do so in development builds (unless someone beats me ;-).
[-]IDLE no longer respects .Xdefaults insertOffTime[/-][+]IDLE: add cursor noblink option[/+]3 remaining items
ZackerySpytz commentedon Oct 28, 2019
I have created a pull request for this issue.
terryjreedy commentedon Nov 13, 2019
Zackary's patch toggles blinking immediately in editor/shell/output windows, but does not affect the FontSample and numerous dialog entry lines. I changed the patch to store 'insertofftime' just once, as idleConf.blink_off_time. This is set the first time a shell or editor is created.
This can be used in a future patch to set the option when other cursor widgets are created. (Trying to update all visible or hidden entry lines is too much work.) For dialogs created just once, this will be the next time IDLE is started. Having these blink for the remainder of a session, if used again, should be a minor nuisance compared to blinking in the shell and editors.
terryjreedy commentedon Nov 13, 2019
My intent is that a followup patch should, for font sample and entry widgets, set insertofftime=0 on creation if not cursor_blink. A new idleConf.set_cursor_blink(widget), something like the new EditorWindow.update_cursor_blink could be used multiple places.
terryjreedy commentedon Nov 13, 2019
New changeset 9c28449 by Terry Jan Reedy (Zackery Spytz) in branch 'master':
bpo-4630: Add cursor no-blink option for IDLE (GH-16960)
9c28449
miss-islington commentedon Nov 13, 2019
New changeset a67bc10 by Miss Islington (bot) in branch '3.8':
bpo-4630: Add cursor no-blink option for IDLE (GH-16960)
a67bc10
miss-islington commentedon Nov 13, 2019
New changeset 753d0c0 by Miss Islington (bot) in branch '3.7':
bpo-4630: Add cursor no-blink option for IDLE (GH-16960)
753d0c0
terryjreedy commentedon Jul 23, 2020
New changeset 592527f by Zackery Spytz in branch 'master':
bpo-4630: Fix errors in Lib/idlelib/NEWS.txt (GH-21594)
592527f
miss-islington commentedon Jul 23, 2020
New changeset 4cf7afc by Miss Islington (bot) in branch '3.9':
bpo-4630: Fix errors in Lib/idlelib/NEWS.txt (GH-21594)
4cf7afc
terryjreedy commentedon Jul 23, 2020
New changeset 29df301 by Terry Jan Reedy in branch '3.8':
[3.8] bpo-4630: Fix errors in Lib/idlelib/NEWS.txt (GH-21594)
29df301