Skip to content

Input cursor with ANSI colors #6234

Open

Description

@TomJGooding

Here's a screenshot of an Input widget with ansi_colors=True in the app. It is hard to make out but the cursor is over the last character.

Image

I think you would expect the usual cursor color - i.e. foreground with inverted text?

Example code
from textual.app import App, ComposeResult
from textual.widgets import Input


class ExampleApp(App):
    def compose(self) -> ComposeResult:
        yield Input("Cursor test", select_on_focus=False)


if __name__ == "__main__":
    app = ExampleApp(ansi_color=True)
    app.run()

Activity

  1. github-actions commented on Nov 17, 2025

    @github-actions

    Thank you for your issue. Give us a little time to review it.

    PS. You might want to check the FAQ if you haven't done so already.

    This project is developed and maintained by Will McGugan. Consider sponsoring Will's work on this project (and others).

    This is an automated reply, generated by FAQtory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions