Changeset 5bbb4453 in mainline for uspace/app/nav/panel.c
- Timestamp:
- 2021-10-25T00:32:45Z (3 years ago)
- Branches:
- master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f59212cc
- Parents:
- 97c3c59
- git-author:
- Jiri Svoboda <jiri@…> (2021-10-19 20:01:48)
- git-committer:
- jxsvoboda <5887334+jxsvoboda@…> (2021-10-25 00:32:45)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/nav/panel.c
r97c3c59 r5bbb4453 523 523 char *olddn; 524 524 size_t pg_size; 525 size_t max_idx; 525 526 size_t i; 526 527 errno_t rc; … … 617 618 --panel->page_idx; 618 619 } 620 621 /* Make sure page is not beyond the end if possible */ 622 if (panel->entries_cnt > pg_size) 623 max_idx = panel->entries_cnt - pg_size; 624 else 625 max_idx = 0; 626 627 while (panel->page_idx > 0 && panel->page_idx > max_idx) { 628 prev = panel_prev(panel->page); 629 if (prev == NULL) 630 break; 631 632 panel->page = prev; 633 --panel->page_idx; 634 } 619 635 } 620 636 } … … 948 964 old_cursor = panel->cursor; 949 965 old_idx = panel->cursor_idx; 950 max_idx = panel->entries_cnt - rows; 966 967 if (panel->entries_cnt > rows) 968 max_idx = panel->entries_cnt - rows; 969 else 970 max_idx = 0; 951 971 952 972 /* Move page by rows entries down (if possible) */
Note:
See TracChangeset
for help on using the changeset viewer.