-
-
Notifications
You must be signed in to change notification settings - Fork 993
Open
Description
While investigating #6064, I discovered a bug on main
with the initial terminal cursor position in the Input
widget.
Try running the example app below which shows the terminal cursor. I don't have any IME or emoji software installed on my machine, but presumably the pop-up would initially appear in completely the wrong position.
A quick bisect points to 3b27d5a.
from textual.app import App, ComposeResult
from textual.containers import CenterMiddle
from textual.widgets import Input
class ExampleApp(App):
CSS = """
Input { width: 70%; }
"""
def compose(self) -> ComposeResult:
with CenterMiddle():
yield Input(
"Terminal cursor should be here ->",
select_on_focus=False,
)
def on_mount(self) -> None:
# Show the terminal cursor
self._driver.write("\x1b[?25h")
if __name__ == "__main__":
app = ExampleApp()
app.run()
Metadata
Metadata
Assignees
Labels
No labels