1
1

* view.c (view_move_forward2): Fixed a bug discovered by

Jindrich Makovicka. The return value did not take into account
	the value of the `upto' parameter.
Этот коммит содержится в:
Roland Illig 2005-04-22 15:01:11 +00:00
родитель 4a96e50b13
Коммит 5b7339a2db
2 изменённых файлов: 11 добавлений и 3 удалений

Просмотреть файл

@ -1,3 +1,9 @@
2005-04-22 Roland Illig <roland.illig@gmx.de>
* view.c (view_move_forward2): Fixed a bug discovered by
Jindrich Makovicka. The return value did not take into account
the value of the `upto' parameter.
2005-04-19 Roland Illig <roland.illig@gmx.de>
* view.c (view_file_load_data): Removed the requirement for

Просмотреть файл

@ -1198,6 +1198,8 @@ view_move_forward2 (WView *view, offset_type current, int lines, offset_type upt
int col = 0;
if (view->hex_mode) {
assert (upto == 0);
last_byte = view_get_filesize (view);
p = current + lines * view->bytes_per_line;
if (p >= last_byte)
@ -1232,12 +1234,12 @@ view_move_forward2 (WView *view, offset_type current, int lines, offset_type upt
int c;
if (lines != -1 && line >= lines)
return p;
break;
/* end of file or reading error -- stop going forward */
if ((c = get_byte (view, p)) == -1)
return p;
break;
if (view->text_wrap_mode) {
if (c == '\r')
continue; /* This characters is never displayed */