Skip to content

fix(textinput): apply missing .TextStyle to virtualCursor#967

Open
marvinlanhenke wants to merge 1 commit into
charmbracelet:mainfrom
marvinlanhenke:fix-textinput-cursor-style
Open

fix(textinput): apply missing .TextStyle to virtualCursor#967
marvinlanhenke wants to merge 1 commit into
charmbracelet:mainfrom
marvinlanhenke:fix-textinput-cursor-style

Conversation

@marvinlanhenke
Copy link
Copy Markdown

@marvinlanhenke marvinlanhenke commented May 10, 2026

  • I have read CONTRIBUTING.md.
  • I have created a discussion that was approved by a maintainer (for new features).

In textinput.go View() we render the virtualCursor with .SetChar() set before.

However, we never apply the the current styles.Text to the .virtualCursor.TextStyle. This can lead to "punched out cells" if the textinput has a different background color set, then the terminal itself. When the cursor is blinking (hidden) the textinput background is also removed for the cursor char.

This PR fixes this by setting m.virtualCursor.TextStyle

@marvinlanhenke
Copy link
Copy Markdown
Author

Before:
image

After:
image

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.

1 participant