Skip to content

IDLE: add cursor noblink option #48880

Closed
Closed

Description

@mark-summerfield
BPO 4630
Nosy @terryjreedy, @mark-summerfield, @serwy, @rovitotv, @ZackerySpytz, @miss-islington
PRs
  • bpo-4630: Add cursor no-blink option for IDLE #16960
  • [3.8] bpo-4630: Add cursor no-blink option for IDLE (GH-16960) #17141
  • [3.7] bpo-4630: Add cursor no-blink option for IDLE (GH-16960) #17142
  • bpo-4630: Fix errors in Lib/idlelib/NEWS.txt #21594
  • [3.9] bpo-4630: Fix errors in Lib/idlelib/NEWS.txt (GH-21594) #21598
  • [3.8] bpo-4630: Fix errors in Lib/idlelib/NEWS.txt (GH-21594)  #21599
  • Files
  • issue_4630.diff
  • issue4630_refreshed.patch
  • 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

    1. mark-summerfield commented on Dec 11, 2008

      mark-summerfieldmannequin
      MannequinAuthor

      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.

    2. mark-summerfield commented on Dec 13, 2008

      mark-summerfieldmannequin
      MannequinAuthor

      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.

    3. decaf commented on Mar 24, 2009

      decafmannequin
      Mannequin

      Would you please share that code with us.

    4. mark-summerfield commented on Mar 24, 2009

      mark-summerfieldmannequin
      MannequinAuthor

      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.

    5. decaf commented on Mar 24, 2009

      decafmannequin
      Mannequin

      Thank you very much. It was a kind of chinese torture.

    6. mark-summerfield commented on Mar 24, 2009

      mark-summerfieldmannequin
      MannequinAuthor

      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

    7. gpolo commented on Mar 27, 2009

      gpolomannequin
      Mannequin

      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 :)

    8. added
      type-feature
      on Mar 27, 2009
    9. mark-summerfield commented on Mar 29, 2009

      mark-summerfieldmannequin
      MannequinAuthor

      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.

    10. gpolo commented on Mar 29, 2009

      gpolomannequin
      Mannequin

      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..

    11. mark-summerfield commented on Mar 30, 2009

      mark-summerfieldmannequin
      MannequinAuthor

      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

    12. bughunter2 commented on Jan 9, 2012

      bughunter2mannequin
      Mannequin

      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.

    13. terryjreedy commented on Jan 11, 2012

      @terryjreedy
      Member

      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 ;-).

    14. changed the title [-]IDLE no longer respects .Xdefaults insertOffTime[/-] [+]IDLE: add cursor noblink option[/+] on Jan 11, 2012
    15. 3 remaining items

    16. self-assigned this
      on Jan 30, 2017
    17. ZackerySpytz commented on Oct 28, 2019

      ZackerySpytzmannequin
      Mannequin

      I have created a pull request for this issue.

    18. terryjreedy commented on Nov 13, 2019

      @terryjreedy
      Member

      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.

    19. terryjreedy commented on Nov 13, 2019

      @terryjreedy
      Member

      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.

    20. terryjreedy commented on Nov 13, 2019

      @terryjreedy
      Member

      New changeset 9c28449 by Terry Jan Reedy (Zackery Spytz) in branch 'master':
      bpo-4630: Add cursor no-blink option for IDLE (GH-16960)
      9c28449

    21. miss-islington commented on Nov 13, 2019

      @miss-islington
      Contributor

      New changeset a67bc10 by Miss Islington (bot) in branch '3.8':
      bpo-4630: Add cursor no-blink option for IDLE (GH-16960)
      a67bc10

    22. miss-islington commented on Nov 13, 2019

      @miss-islington
      Contributor

      New changeset 753d0c0 by Miss Islington (bot) in branch '3.7':
      bpo-4630: Add cursor no-blink option for IDLE (GH-16960)
      753d0c0

    23. terryjreedy commented on Jul 23, 2020

      @terryjreedy
      Member

      New changeset 592527f by Zackery Spytz in branch 'master':
      bpo-4630: Fix errors in Lib/idlelib/NEWS.txt (GH-21594)
      592527f

    24. miss-islington commented on Jul 23, 2020

      @miss-islington
      Contributor

      New changeset 4cf7afc by Miss Islington (bot) in branch '3.9':
      bpo-4630: Fix errors in Lib/idlelib/NEWS.txt (GH-21594)
      4cf7afc

    25. terryjreedy commented on Jul 23, 2020

      @terryjreedy
      Member

      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

    26. added
      3.10 (EOL)
      and removed
      3.7 (EOL)
      on Jul 23, 2020
    27. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    3.10 (EOL)topic-IDLEtype-feature

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions