Skip to content

[ISSUE-156] REPL auto-scroll not working #162

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jaiaani
Copy link

@jaiaani jaiaani commented Jul 3, 2025

Bug description:

Describe the bug
When interacting with the REPL through Actions, the console does not scroll automatically.

To Reproduce
Steps to reproduce the behavior:

Evaluate a lot of times a code
Check that when the content of the REPL console window is bigger than the window, it does not scroll automatically
Expected behavior
Automatically scroll when new content is added

I was not able to reproduce this behavior when the repl initialize corretly, but when REPL fails to initialize the auto-scroll was really not working.

before:

Gravacao.de.Tela.2025-07-03.as.02.43.17.mov

after:

Gravacao.de.Tela.2025-07-03.as.02.44.12.mov

Checklist

  • Added changes in the Unreleased section of CHANGELOG.md

@jaiaani jaiaani changed the title move caret every time text is set [ISSUE-156] REPL auto-scroll not working Jul 3, 2025
(.setText repl-content final-text)
(when-let [editor ^EditorEx (.getEditor repl-content)]
(.moveToOffset (.getCaretModel editor) (.getTextLength (.getDocument repl-content)))
(.scrollToCaret (.getScrollingModel editor) ScrollType/MAKE_VISIBLE)))}))) ;; Same here, maybe do a function for that?
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont pretend to keep the comments, its just to give visibillity

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that we can do a function to this, so if we need to change the behavior is easier.

@afucher
Copy link
Owner

afucher commented Jul 18, 2025

Hey @jaiaani thanks for the contribution!
Can you please update your branch with master? Also, I agree that a function can be extracted from the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants