Fix console input cursor not repositioning after output - #2849
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses Eclipse console usability by ensuring the input caret is repositioned to the next writable input partition after program output is written, aligning behavior with expectations described in issue #2127.
Changes:
- Added
repositionCaretAfterOutput()toIOConsoleViewerto move the caret to the next writable input partition. - Invoked caret repositioning after auto-scroll reveals the end of the document on document change events.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
8d4fd59 to
576aed1
Compare
|
OK, looks good from the code point of view, tested with this snippet: Could you please add a test for this fix? |
011f8b6 to
0593ec6
Compare
Added, |
|
Hmm. The failing tests are all about "not yet closed/disposed" consoles, interestingly they are all different and failing in different OS. The common thing is that some console is still "alive" and not closed. |
Added repositionCaretAfterOutput() to IOConsoleViewer to move the caret to the next writable input partition whenever output is written. Fixes : eclipse-platform#2127
9804826 to
90552f6
Compare
|
Build looks good now 👍 |
I've created #2852. |
|
Thanks! |
It seems that we either have race condition in ConsoleManager & related code, or that some tests "leak" created Console instances and they are popping around at unexpected times in other tests. Let forcibly remove all Consoles in all tests related to ConsoleManager and let assume before the test there are no Console instances flying around. See eclipse-platform#2849 (comment)
It seems that we either have race condition in ConsoleManager & related code, or that some tests "leak" created Console instances and they are popping around at unexpected times in other tests. Let forcibly remove all Consoles in all tests related to ConsoleManager and let assume before the test there are no Console instances flying around. See #2849 (comment)
Added repositionCaretAfterOutput() to IOConsoleViewer to move the caret to the next writable input partition whenever output is written.

Before :
After :

Fixes : #2127