msg51599 - (view) |
Author: Tal Einat (taleinat) *  |
Date: 2006-12-23 13:16 |
The completion list placement logic is currently very primitive. Sometimes the completion list extends outside of the editor window, or even outside the screen so that part of it is not visible. This patch places the completion list inside the text widget if possible, above or below the typed text, as appropriate. It will not hide the currently typed text in any case. End-cases: * If the text widget is not high enough, the completion list is placed below the currently typed text. * If the text widget is not wide enough, the completion list is aligned with the left-most edge of the text widget. In any case the size of the completion list is not altered to fit the text widget, though this would probably be the best solution when the text widget is too small. This means that with this patch, the completion list may extend beyond the text widget if it is small. I have not implemented resizing of the list this since the list's size is currently not set at all - Tk's default is used. Changing it anywhere in the code would require setting it elsewhere, hard-coding a default or making it configurable, etc. Comments please! |
|
|
msg51600 - (view) |
Author: Kurt B. Kaiser (kbk) *  |
Date: 2007-02-05 04:16 |
Haven't you introduced a regression on [ 1571112 ] simple moves freeze IDLE by the changes at the beginning of the patch? Also, the assignment to previous_completion was intended to make the code clearer. |
|
|
msg51601 - (view) |
Author: Tal Einat (taleinat) *  |
Date: 2007-02-05 12:03 |
My mistake - I missed the changes at the top! I meant only to patch the placement mechanism. The newly attached patch includes only the fix for window placement. BTW, that change to the completion logic seems buggy - if a duplicate completion entry is selected, only one more letter (if available) will be added? IMO the current completion logic is weird and non-intuitive. When selecting a completion from the list (in any way) I would expect it all to appear where I am typing, not just some of it... File Added: AutoCompleteWindow.placement.070205.patch |
|
|
msg51602 - (view) |
Author: Kurt B. Kaiser (kbk) *  |
Date: 2007-02-07 03:47 |
Rev 53653 Thanks for the patch! I agree with your comment about the completion logic. I would have thought that by now someone from Noam's enthusiast group would have sent a patch. If there's only one completion, a tab should complete it. If there is a mouse selection in the ACW, it should be chosen. If an up/down cursor key is used to change the ACW selection, the selection should be chosen. Otherwise, the closest match in the ACW window to what's been typed should be highlighted. I'm looking at it. Any comments on this? The change to the completion logic prevented a loop, but as you say, the logic was buggy to begin with. |
|
|
msg51603 - (view) |
Author: Tal Einat (taleinat) *  |
Date: 2007-02-07 07:26 |
My only comment is that I've already implemented precisely the logic you've described. The changes required are mostly removal of code... I could cough up a patch, sometime about the weekend. (That way we could also move the conversation from here :) |
|
|
msg51604 - (view) |
Author: Kurt B. Kaiser (kbk) *  |
Date: 2007-02-08 23:00 |
Well, I've checked something in, see NEWS.txt. Take a look; I think it should be backported. |
|
|