mirror of
https://github.com/fairyglade/ly.git
synced 2026-03-25 01:36:05 +00:00
Add toggle visibility to password (#938)
## What are the changes about? I have add a keybinding to toggle the visibility of the password ## What existing issue does this resolve? N/A ## Pre-requisites - [x] I have tested & confirmed the changes work locally Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/938 Reviewed-by: AnErrupTion <anerruption+codeberg@disroot.org> Co-authored-by: Luna <luna-39@noreply.codeberg.org> Co-committed-by: Luna <luna-39@noreply.codeberg.org>
This commit is contained in:
@@ -96,6 +96,10 @@ pub fn clear(self: *Text) void {
|
||||
self.visible_start = 0;
|
||||
}
|
||||
|
||||
pub fn toggleMask(self: *Text) void {
|
||||
self.masked = !self.masked;
|
||||
}
|
||||
|
||||
pub fn handle(self: *Text, maybe_key: ?keyboard.Key, insert_mode: bool) !void {
|
||||
if (maybe_key) |key| {
|
||||
if (key.left or (!insert_mode and (key.h or key.backspace))) {
|
||||
|
||||
Reference in New Issue
Block a user