diff options
-rw-r--r-- | miscutils/hexedit.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/miscutils/hexedit.c b/miscutils/hexedit.c index 95c930d12..298eb8149 100644 --- a/miscutils/hexedit.c +++ b/miscutils/hexedit.c | |||
@@ -153,7 +153,8 @@ static void redraw(unsigned cursor) | |||
153 | i++; | 153 | i++; |
154 | } | 154 | } |
155 | 155 | ||
156 | printf(ESC"[%u;%uH", 1 + cursor / 16, 1 + pos + (cursor & 0xf) * 3); | 156 | G.row = cursor / 16; |
157 | printf(ESC"[%u;%uH", 1 + G.row, 1 + pos + (cursor & 0xf) * 3); | ||
157 | } | 158 | } |
158 | 159 | ||
159 | static void redraw_cur_line(void) | 160 | static void redraw_cur_line(void) |
@@ -367,6 +368,8 @@ int hexedit_main(int argc UNUSED_PARAM, char **argv) | |||
367 | if (G.current_byte > G.eof_byte) { | 368 | if (G.current_byte > G.eof_byte) { |
368 | /* _after_ eof - don't allow this */ | 369 | /* _after_ eof - don't allow this */ |
369 | G.current_byte -= 16; | 370 | G.current_byte -= 16; |
371 | if (G.current_byte < G.baseaddr) | ||
372 | move_mapping_lower(); | ||
370 | break; | 373 | break; |
371 | } | 374 | } |
372 | } | 375 | } |