Normalize entry parsing and display order
This commit is contained in:
@@ -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"));
|
||||
|
||||
Reference in New Issue
Block a user