Skip to content
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

feat: real cursor in textinput #727

Merged
merged 3 commits into from
Feb 7, 2025
Merged

feat: real cursor in textinput #727

merged 3 commits into from
Feb 7, 2025

Conversation

caarlos0
Copy link
Member

@caarlos0 caarlos0 commented Feb 6, 2025

PS: we should probably use v2 as an opportunity to standarize some APIs, e.g.:

  • Styles as a field the user can set
  • Cursor wherever there are inputs
  • ??

Signed-off-by: Carlos Alexandro Becker <[email protected]>
@caarlos0 caarlos0 self-assigned this Feb 6, 2025
@caarlos0 caarlos0 changed the base branch from master to v2-exp February 6, 2025 18:55
@caarlos0 caarlos0 changed the title Input real cursor feat: real cursor in textinput Feb 6, 2025
textinput/textinput.go Outdated Show resolved Hide resolved
@meowgorithm
Copy link
Member

Yep, agreed. For Styles on this one we should probably duplicate textarea's style structure given the focused and blurred states.

@caarlos0
Copy link
Member Author

caarlos0 commented Feb 7, 2025

tested this on some bubbletea examples, seems to be fine 🙏🏻

@caarlos0 caarlos0 merged commit 605d06c into v2-exp Feb 7, 2025
16 of 26 checks passed
@caarlos0 caarlos0 deleted the input-real-cursor branch February 7, 2025 13:48
CompletionStyle lipgloss.Style
// VirtualCursor determines whether or not to use the virtual cursor. If
// set to false, use [Model.Cursor] to return a real cursor for rendering.
VirtualCursor bool
Copy link
Member

Choose a reason for hiding this comment

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

So textinput will start with VirtualCursor right?

Copy link
Member

Choose a reason for hiding this comment

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

sorry now I see it is the config to swich

Copy link
Member

@raphamorim raphamorim left a comment

Choose a reason for hiding this comment

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

overral lgmt

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.

3 participants