impala icon indicating copy to clipboard operation
impala copied to clipboard

Cursor indicator when typing passwords. [feature]

Open otomist opened this issue 2 months ago • 1 comments

When typing in passwords there's currently no indicator for the cursor position. This is true for typing hidden or revealed passwords.

It would be nice if there was a small indicator, especially for when you're typing revealed passwords so that you can make small edits when you make a mistake.

Image

otomist avatar Dec 01 '25 04:12 otomist

I have a working sample implementation on my fork: https://github.com/pythops/impala/compare/main...otomist:impala:visible-cursor?expand=1

If you think this feature is a good one for the project I can make a pr and or changes. It's currently using a | as an indicator not a "block" but that can be changed if you think block is better

otomist avatar Dec 01 '25 05:12 otomist

I have seen your implementation, I think it is be better to do it using tui input crate itself. look at this example https://github.com/sayanarijit/tui-input/blob/77634cf42c22fd68657a9c45b5ebd66559bf127a/examples/ratatui_crossterm_input.rs#L123

pythops avatar Dec 01 '25 08:12 pythops

@pythops Thanks for the quick response! That's a good point I should have checked tui-input first. I'll put a pr in soon with an adjusted implementation.

otomist avatar Dec 01 '25 16:12 otomist