Moved the view_hexview_move_to_eol() function some lines down to make the next patch apply more cleanly.

This commit is contained in:
Roland Illig 2005-05-26 09:07:40 +00:00
parent 70cb15ff0f
commit 45355775fe

View File

@ -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)