Skip to content

Commit cb2b5c3

Browse files
authored
Hide the cursor when the password prompt is showing (jesseduffield#4878)
The cursor is a bit of a security concern, because it reveals the length (and typing pattern) of the password. Resolves jesseduffield#4877.
2 parents 6941b81 + 851afe9 commit cb2b5c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/gui/context.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ func (self *ContextMgr) Activate(c types.Context, opts types.OnFocusOpts) {
196196

197197
v.Visible = true
198198

199-
self.gui.c.GocuiGui().Cursor = v.Editable
199+
self.gui.c.GocuiGui().Cursor = v.Editable && v.Mask == 0
200200

201201
c.HandleFocus(opts)
202202
}

0 commit comments

Comments
 (0)