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.

Author terry.reedy
Recipients serhiy.storchaka, terry.reedy
Date 2016-05-24.23:26:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1464132389.32.0.350798699754.issue27115@psf.upfronthosting.co.za>
In-reply-to
Content
On Win 10, Python 3.5 or 3.6, IDLE Shell or Editor with at least a few lines of text: hit Alt-G to open 'Goto' window.  Enter a line # other than the current one.  Hit <Return>.  Cursor moves to line enter, though it shrinks to one pixel wide from two pixels.  Line:col in status bar is updated.

Instead of hitting return, click [OK] button.  Same thing happens except that status bar line:col is NOT updated.  Here is relevant code in EditorWindow, about line 610

    def goto_line_event(self, event):
        text = self.text
        lineno = tkSimpleDialog.askinteger("Goto",
                "Go to line number:",parent=text)
        text.mark_set("insert", "%d.0" % lineno)
        text.see("insert")

Changing parent=text to parent=self.root makes no difference.  I have not yet tried simulating the interaction with button.invoke and event_generate('<Key-Return>.

My guess is that one of the last two tk methods is supposed to generate a cursor moved event that is bound to a reset status bar function.  But somehow the previous click instead of keypress inhibits the event.  So this seems a tk bug.  Sethiy, what do you think?

The workaround for IDLE is to manually invoke a status bar update.
History
Date User Action Args
2016-05-24 23:26:29terry.reedysetrecipients: + terry.reedy, serhiy.storchaka
2016-05-24 23:26:29terry.reedysetmessageid: <1464132389.32.0.350798699754.issue27115@psf.upfronthosting.co.za>
2016-05-24 23:26:29terry.reedylinkissue27115 messages
2016-05-24 23:26:29terry.reedycreate