Normalize entry parsing and display order

This commit is contained in:
2026-08-11 07:28:15 +02:00
parent 2a8c941a65
commit d21f5bd467
6 changed files with 262 additions and 74 deletions

View File

@@ -39,7 +39,7 @@ impl EntryViewer {
}
pub fn focused_field(&self) -> Option<&EntryField> {
self.document.fields().get(self.focused)
self.document.display_fields().get(self.focused).copied()
}
pub fn focus_next(&mut self) {
@@ -231,8 +231,7 @@ mod tests {
#[test]
fn copy_uses_only_the_focused_structured_value() {
let mut viewer = EntryViewer::new(fixture_document("email/personal"));
viewer.focus_next();
let viewer = EntryViewer::new(fixture_document("email/personal"));
let copied = viewer.copy_focused().expect("copy value");
assert_eq!(copied.expose(), b"alice@example.test");
assert!(!format!("{viewer:?}").contains("correct horse fixture"));