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 roger.serwy
Recipients cben, kbk, roger.serwy, terry.reedy
Date 2008-06-17.00:56:54
SpamBayes Score 0.019578885
Marked as misclassified No
Message-id <1213664220.08.0.248748614246.issue2704@psf.upfronthosting.co.za>
In-reply-to
Content
I rewrote the patch to better handle multi-line input. In rewriting the
patch I realized that there can be many different ways to handle up/down
key presses while the cursor is in the input region. Here is the
behavior of this patch:

For single line inputs:
* If the cursor is at the end of the line, then up/down navigates the
history.
* If the cursor is not at the end of the line, then up/down places the
cursor at the end, so that subsequent up/down navigates the history. 

For multi-line inputs:
* If the cursor is at the end of the input and the input is in the
history, then up/down navigates the history.
* If the cursor is at the end of the input and the input is NOT in the
history, then up will move the cursor up.
* If the cursor is at the first line of the input, then up will be ignored.
* If the cursor is on the last line of the input, then down will be ignored.

If the cursor leaves the input area, either by pressing left at the
start of the input area, or by clicking elsewhere in the text box, the
up/down keys behave as they do now.

If the cursor is outside the input area and a character key is pressed,
the cursor is placed and the end of the input, and the character is
placed there. 

Also, this patch fixes a subtle cursor placement bug when dealing with
multi-line inputs. When navigating from line 2 to line 1 of a
multi-line, the cursor can end up in the ">>>" prompt. This is fixed so
that the cursor stays in the input area.
History
Date User Action Args
2008-06-17 00:57:00roger.serwysetspambayes_score: 0.0195789 -> 0.019578885
recipients: + roger.serwy, terry.reedy, kbk, cben
2008-06-17 00:57:00roger.serwysetspambayes_score: 0.0195789 -> 0.0195789
messageid: <1213664220.08.0.248748614246.issue2704@psf.upfronthosting.co.za>
2008-06-17 00:56:58roger.serwylinkissue2704 messages
2008-06-17 00:56:58roger.serwycreate