Skip to content

Commit b7d549d

Browse files
committed
Partial fix for #37
1 parent 71304cd commit b7d549d

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/hex/selection.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ impl Selection {
4646
}
4747

4848
if self.start == self.end {
49-
self.direction = Some(Direction::Left);
49+
self.direction = None;
5050
}
5151
}
5252
pub fn select_right(&mut self, offset_max: usize, step: usize) {
@@ -59,7 +59,7 @@ impl Selection {
5959
Some(Direction::Right) => self.end = (self.end + step).min(offset_max),
6060
}
6161
if self.start == self.end {
62-
self.direction = Some(Direction::Right);
62+
self.direction = None;
6363
}
6464
}
6565
}
@@ -97,11 +97,6 @@ pub fn select_events(app: &mut App, key: KeyEvent) -> Result<bool> {
9797
.offset
9898
.saturating_sub(app.config.hex_mode_bytes_per_line);
9999

100-
// return if at the first offset
101-
if new_offset == 0 {
102-
return Ok(true);
103-
}
104-
105100
app.hex_view
106101
.selection
107102
.select_left(app.config.hex_mode_bytes_per_line);

0 commit comments

Comments
 (0)