homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: IDLE: add cursor noblink option
Type: enhancement Stage: resolved
Components: IDLE Versions: Python 3.10
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: Todd.Rovito, ZackerySpytz, bughunter2, decaf, donmez, gpolo, mark, miss-islington, roger.serwy, terry.reedy
Priority: normal Keywords: patch

Created on 2008年12月11日 08:05 by mark, last changed 2022年04月11日 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue_4630.diff gpolo, 2009年03月29日 10:40 review
issue4630_refreshed.patch roger.serwy, 2013年04月12日 06:08 review
Pull Requests
URL Status Linked Edit
PR 16960 merged ZackerySpytz, 2019年10月28日 10:51
PR 17141 merged miss-islington, 2019年11月13日 07:15
PR 17142 merged miss-islington, 2019年11月13日 07:15
PR 21594 merged ZackerySpytz, 2020年07月22日 21:34
PR 21598 merged miss-islington, 2020年07月23日 06:06
PR 21599 merged terry.reedy, 2020年07月23日 07:46
Messages (24)
msg77598 - (view) Author: Mark Summerfield (mark) * Date: 2008年12月11日 08:05
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.
msg77720 - (view) Author: Mark Summerfield (mark) * Date: 2008年12月13日 09:13
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.
msg84056 - (view) Author: Mehmet Köse (decaf) Date: 2009年03月24日 03:27
Would you please share that code with us.
msg84061 - (view) Author: Mark Summerfield (mark) * Date: 2009年03月24日 06:58
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.
msg84073 - (view) Author: Mehmet Köse (decaf) Date: 2009年03月24日 10:37
Thank you very much. It was a kind of chinese torture.
msg84074 - (view) Author: Mark Summerfield (mark) * Date: 2009年03月24日 10:47
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 
msg84285 - (view) Author: Guilherme Polo (gpolo) * (Python committer) Date: 2009年03月27日 22:25
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 :)
msg84366 - (view) Author: Mark Summerfield (mark) * Date: 2009年03月29日 07:08
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.
msg84371 - (view) Author: Guilherme Polo (gpolo) * (Python committer) Date: 2009年03月29日 10:40
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..
msg84522 - (view) Author: Mark Summerfield (mark) * Date: 2009年03月30日 06:55
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
msg150937 - (view) Author: Jelle Geerts (bughunter2) Date: 2012年01月09日 14:23
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.
msg151045 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2012年01月11日 09:01
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 ;-).
msg186589 - (view) Author: Ismail Donmez (donmez) * Date: 2013年04月11日 20:36
Time to say ping here. This patch is still would be useful for Python.
msg186611 - (view) Author: Roger Serwy (roger.serwy) * (Python committer) Date: 2013年04月12日 06:08
Attached is an updated version of the patch against the latest 2.7 code.
msg286494 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017年01月30日 16:28
SO request for same: https://stackoverflow.com/questions/41937748/stop-cursor-blinking-in-idle.
msg355521 - (view) Author: Zackery Spytz (ZackerySpytz) * (Python triager) Date: 2019年10月28日 10:54
I have created a pull request for this issue.
msg356516 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2019年11月13日 05:15
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.
msg356517 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2019年11月13日 06:31
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.
msg356518 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2019年11月13日 07:13
New changeset 9c2844927d15b2d3e21b28d62249dead02b5b597 by Terry Jan Reedy (Zackery Spytz) in branch 'master':
bpo-4630: Add cursor no-blink option for IDLE (GH-16960)
https://github.com/python/cpython/commit/9c2844927d15b2d3e21b28d62249dead02b5b597
msg356520 - (view) Author: miss-islington (miss-islington) Date: 2019年11月13日 07:36
New changeset a67bc10e42fa9a077eb4d9d7bd767c3efddbc366 by Miss Islington (bot) in branch '3.8':
bpo-4630: Add cursor no-blink option for IDLE (GH-16960)
https://github.com/python/cpython/commit/a67bc10e42fa9a077eb4d9d7bd767c3efddbc366
msg356521 - (view) Author: miss-islington (miss-islington) Date: 2019年11月13日 07:37
New changeset 753d0c05b39f21d5987d59d7fe8b5a6d721bc22c by Miss Islington (bot) in branch '3.7':
bpo-4630: Add cursor no-blink option for IDLE (GH-16960)
https://github.com/python/cpython/commit/753d0c05b39f21d5987d59d7fe8b5a6d721bc22c
msg374122 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020年07月23日 06:06
New changeset 592527f3ee59616eca2bd1da771f7c14cee808d5 by Zackery Spytz in branch 'master':
bpo-4630: Fix errors in Lib/idlelib/NEWS.txt (GH-21594)
https://github.com/python/cpython/commit/592527f3ee59616eca2bd1da771f7c14cee808d5
msg374125 - (view) Author: miss-islington (miss-islington) Date: 2020年07月23日 06:26
New changeset 4cf7afcefcd1eb1ab233ed4523eb2b3bbf599c81 by Miss Islington (bot) in branch '3.9':
bpo-4630: Fix errors in Lib/idlelib/NEWS.txt (GH-21594)
https://github.com/python/cpython/commit/4cf7afcefcd1eb1ab233ed4523eb2b3bbf599c81
msg374128 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020年07月23日 08:18
New changeset 29df301a9236cbae06762d9569e56197d3f5e6ee by Terry Jan Reedy in branch '3.8':
 [3.8] bpo-4630: Fix errors in Lib/idlelib/NEWS.txt (GH-21594)
https://github.com/python/cpython/commit/29df301a9236cbae06762d9569e56197d3f5e6ee
History
Date User Action Args
2022年04月11日 14:56:42adminsetgithub: 48880
2020年07月23日 08:20:12terry.reedysetstatus: open -> closed
stage: patch review -> resolved
resolution: fixed
versions: + Python 3.10, - Python 3.6, Python 3.7
2020年07月23日 08:18:15terry.reedysetmessages: + msg374128
2020年07月23日 07:46:21terry.reedysetpull_requests: + pull_request20738
2020年07月23日 06:26:06miss-islingtonsetmessages: + msg374125
2020年07月23日 06:06:51miss-islingtonsetpull_requests: + pull_request20737
2020年07月23日 06:06:33terry.reedysetmessages: + msg374122
2020年07月22日 21:34:35ZackerySpytzsetpull_requests: + pull_request20733
2019年11月13日 07:37:10miss-islingtonsetmessages: + msg356521
2019年11月13日 07:36:46miss-islingtonsetnosy: + miss-islington
messages: + msg356520
2019年11月13日 07:15:30miss-islingtonsetpull_requests: + pull_request16651
2019年11月13日 07:15:23miss-islingtonsetpull_requests: + pull_request16650
2019年11月13日 07:13:37terry.reedysetmessages: + msg356518
2019年11月13日 06:31:59terry.reedysetmessages: + msg356517
2019年11月13日 05:15:37terry.reedysetmessages: + msg356516
2019年10月28日 10:54:47ZackerySpytzsetnosy: + ZackerySpytz
messages: + msg355521
2019年10月28日 10:51:38ZackerySpytzsetpull_requests: + pull_request16488
2017年01月30日 16:28:43terry.reedysetassignee: terry.reedy
messages: + msg286494
versions: + Python 3.6, Python 3.7, - Python 2.7, Python 3.3, Python 3.4
2013年04月12日 06:08:35roger.serwysetfiles: + issue4630_refreshed.patch
nosy: + roger.serwy
messages: + msg186611

2013年04月12日 05:56:52terry.reedysetversions: + Python 3.4, - Python 3.2
2013年04月11日 20:36:53donmezsetnosy: + donmez
messages: + msg186589
2013年03月25日 18:15:36Todd.Rovitosetnosy: + Todd.Rovito
2012年01月11日 09:06:21terry.reedysettitle: IDLE no longer respects .Xdefaults insertOffTime -> IDLE: add cursor noblink option
2012年01月11日 09:01:41terry.reedysetnosy: + terry.reedy

messages: + msg151045
versions: + Python 2.7, Python 3.3
2012年01月09日 14:23:22bughunter2setnosy: + bughunter2
messages: + msg150937
2010年08月09日 03:43:16terry.reedysetstage: patch review
versions: + Python 3.2, - Python 3.1, Python 2.7
2009年03月30日 06:55:14marksetmessages: + msg84522
2009年03月29日 10:40:27gpolosetfiles: + issue_4630.diff
keywords: + patch
messages: + msg84371
2009年03月29日 07:08:48marksetmessages: + msg84366
2009年03月27日 22:25:53gpolosetversions: + Python 3.1, Python 2.7, - Python 3.0
nosy: + gpolo

messages: + msg84285

type: enhancement
2009年03月24日 10:47:44marksetmessages: + msg84074
2009年03月24日 10:37:51decafsetmessages: + msg84073
2009年03月24日 06:58:56marksetmessages: + msg84061
2009年03月24日 03:27:50decafsetnosy: + decaf
messages: + msg84056
2008年12月13日 09:13:51marksetmessages: + msg77720
2008年12月11日 08:05:53markcreate

AltStyle によって変換されたページ (->オリジナル) /