fix space rendering for partial chunks

This commit is contained in:
alice pellerin
2026-03-22 20:09:47 -05:00
parent 4c3e91930f
commit a6cf1831c0
2 changed files with 13 additions and 11 deletions
+3
View File
@@ -188,6 +188,8 @@ mod hex {
bytes: &[u8] bytes: &[u8]
) -> impl Iterator<Item=Span<'static>> { ) -> impl Iterator<Item=Span<'static>> {
#[allow(unstable_name_collisions)] #[allow(unstable_name_collisions)]
iter::once(self.render_large_space_before(address))
.chain(
bytes bytes
.iter() .iter()
.copied() .copied()
@@ -199,6 +201,7 @@ mod hex {
.skip(1) .skip(1)
.map(|address| self.render_space_before(address)) .map(|address| self.render_space_before(address))
) )
)
} }
fn render_byte_at( fn render_byte_at(
-1
View File
@@ -27,7 +27,6 @@ const LINES_OF_PADDING: usize = 5;
const BYTES_OF_PADDING: usize = LINES_OF_PADDING * BYTES_PER_LINE; const BYTES_OF_PADDING: usize = LINES_OF_PADDING * BYTES_PER_LINE;
// TODO: // TODO:
// - some way to inspect just one interpretation
// - search // - search
// - ascii and bytes (`/` and `A-/`?) // - ascii and bytes (`/` and `A-/`?)
// - diffing // - diffing