dz6 0.8.0

Fast Vim-inspired hex editor for the terminal
1
2
3
4
5
6
7
8
9
10
11
12
13
use std::io::Result;

use ratatui::crossterm::event::KeyEvent;

use crate::{app::App, header::formats};

pub fn header_view_events(app: &mut App, key: KeyEvent) -> Result<bool> {
    match app.file_info.r#type {
        "ELF" => formats::elf::events::view_header_elf_events(app, key),
        "PE" => formats::pe::events::view_header_pe_events(app, key),
        _ => Ok(false),
    }
}