Author terry.reedy
Recipients Al.Sweigart, littleq0903, louielu, markroseman, ned.deily, paulsfo, roger.serwy, serhiy.storchaka, suddha.sourav, taleinat, terry.reedy
Date 2017-06-14.20:10:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1497471053.24.0.384251703111.issue15786@psf.upfronthosting.co.za>
In-reply-to
Content
With the severe click bug apparently fixed, I focused on Suddha Sourav last sentence "In addition, pressing enter does not autocomplete but execute what was meant to be selected."  In current freshly started IDLE, for example

>>> re.c<^-space>

brings up a box with [compile] highlighted.  On hitting <Return> one sees

>>> re.c
...
NameError: name 're' is not defined

'c' has not been completed to 'compile' and \n has been inserted into the Text widget, causing the line (in the shell) to be compiled and executed.  I imagine that everyone would prefer ">>> re.compile" with the cursor at the end.  The fix is so simple that I decided to include it here, today.  In autocomplete_w.AutoCompleteWindow.keypress_event, change
        elif keysym == "Return":
            self.hide_window()
            return None
to
        elif keysym == "Return":
            self.complete()
            self.hide_window()
            return 'break'
History
Date User Action Args
2017-06-14 20:10:53terry.reedysetrecipients: + terry.reedy, taleinat, ned.deily, roger.serwy, markroseman, Al.Sweigart, serhiy.storchaka, littleq0903, suddha.sourav, paulsfo, louielu
2017-06-14 20:10:53terry.reedysetmessageid: <1497471053.24.0.384251703111.issue15786@psf.upfronthosting.co.za>
2017-06-14 20:10:53terry.reedylinkissue15786 messages
2017-06-14 20:10:53terry.reedycreate