chiark / gitweb /
Fix character counting in masked passwords.
authorSimon Tatham <anakin@pobox.com>
Sat, 3 Feb 2024 12:06:04 +0000 (12:06 +0000)
committerSimon Tatham <anakin@pobox.com>
Sat, 3 Feb 2024 12:06:04 +0000 (12:06 +0000)
commitda72dd0e3b980dd5ac1fca941d00713efef8451c
tree605e0569b239455fc50306b408f2be4b4ed50c12
parent4b7a7f98811c1413704cf65ba3d1c71400c40551
Fix character counting in masked passwords.

Thanks to Ian for picking this out of Clippy's huge output dump: when
counting the things in a str that EditorCore would regard as
characters, we were using 'map' rather than 'filter' to pick out
things with positive terminal width, which had no effect on the
following .count(). So a Unicode combining character would display an
extra * in the masked password when _not_ editing it, compared to when
editing it.
src/editor.rs