-
Notifications
You must be signed in to change notification settings - Fork 815
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
Auto scroll when cursor moves out of the screen inside the TextArea #3494
Comments
Is the text area off the bottom of the screen? What happens if you put a border around the text area? Do you see the bottom border? |
The text area is off the bottom of the screen, yes. Screen.Recording.2023-10-10.at.10.26.29.mov |
Isn't this essentially a problem for all widgets that implement a cursor of some description? Or moreover, isn't this a styling choice within the app? For example: from textual.app import App, ComposeResult
from textual.widgets import OptionList
class ScrollApp(App[None]):
def compose(self) -> ComposeResult:
yield OptionList(
*[f"This is option {n}" for n in range(500)]
)
if __name__ == "__main__":
ScrollApp().run() You could probably do similar with |
Then I don't think it should scroll. It's too much to expect a widget to keep its cursor visible within its container. |
It's “too much” in what sense? Isn't this the expected behaviour? |
Maybe. But it seems a low priority. We can revisit it later. |
Don't forget to star the repository! Follow @textualizeio for Textual updates. |
When typing inside the text area, if you change lines and the new line is not visible, the screen should probably scroll so that the new line becomes visible.
Current behaviour:
Screen.Recording.2023-10-10.at.10.13.26.mov
The text was updated successfully, but these errors were encountered: