mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-22 03:02:06 +03:00
Moved the view_hexview_move_to_eol() function some lines down to make the next patch apply more cleanly.
This commit is contained in:
parent
70cb15ff0f
commit
45355775fe
34
src/view.c
34
src/view.c
@ -311,23 +311,6 @@ view_get_datacolumns (WView *view)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
view_hexview_move_to_eol(WView *view)
|
||||
{
|
||||
offset_type filesize, linestart;
|
||||
|
||||
assert(view->bytes_per_line >= 1);
|
||||
|
||||
linestart = view->hex_cursor - view->hex_cursor % view->bytes_per_line;
|
||||
if (get_byte_indexed (view, linestart, view->bytes_per_line - 1) != -1) {
|
||||
view->hex_cursor = linestart + view->bytes_per_line - 1;
|
||||
} else {
|
||||
filesize = view_get_filesize (view);
|
||||
view->hex_cursor = (filesize >= 1) ? filesize - 1 : 0;
|
||||
}
|
||||
view->dirty++;
|
||||
}
|
||||
|
||||
/* Both views */
|
||||
static void
|
||||
view_done (WView *view)
|
||||
@ -2311,6 +2294,23 @@ continue_search (WView *view)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
view_hexview_move_to_eol(WView *view)
|
||||
{
|
||||
offset_type filesize, linestart;
|
||||
|
||||
assert(view->bytes_per_line >= 1);
|
||||
|
||||
linestart = view->hex_cursor - view->hex_cursor % view->bytes_per_line;
|
||||
if (get_byte_indexed (view, linestart, view->bytes_per_line - 1) != -1) {
|
||||
view->hex_cursor = linestart + view->bytes_per_line - 1;
|
||||
} else {
|
||||
filesize = view_get_filesize (view);
|
||||
view->hex_cursor = (filesize >= 1) ? filesize - 1 : 0;
|
||||
}
|
||||
view->dirty++;
|
||||
}
|
||||
|
||||
/* Both views */
|
||||
static cb_ret_t
|
||||
view_handle_key (WView *view, int c)
|
||||
|
Loading…
Reference in New Issue
Block a user