Skip to content

Commit c7d39ec

Browse files
oetikerclaude
andcommitted
fix(view): show ⟨Enter to modify⟩ hint on empty password fields
A password widget field with no stored value showed nothing (zero bullets), giving no affordance hint. Follow the same pattern used for SambaSid / NextNumber auto-fills: return the dim-italic hint string from empty_auto_fill_hint() when secret_len == 0. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 1d3c236 commit c7d39ec

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/ui/view.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,15 @@ fn selection_style(active: bool) -> Style {
321321
/// the user knows Enter fills it.
322322
fn empty_auto_fill_hint(fld: &EditField) -> Option<&'static str> {
323323
use crate::config::widget::WidgetKind;
324-
if fld.orphaned || !fld.editor.value().trim().is_empty() {
324+
if fld.orphaned {
325+
return None;
326+
}
327+
// Password widget with no stored value: invite the user to set one.
328+
if matches!(&fld.widget_binding, Some(WidgetKind::Password(_))) && secret_len(fld) == 0 {
329+
return Some("⟨Enter to modify⟩");
330+
}
331+
// Editor-based auto-fills: only show the hint when the editor is still empty.
332+
if !fld.editor.value().trim().is_empty() {
325333
return None;
326334
}
327335
match fld.widget_binding {

0 commit comments

Comments
 (0)