Commits

Ilya Arkhipov committed fc003b8

added one of checks for fix issue #7

  • Participants
  • Parent commits 3cc0869
  • Tags release_0.1.4

Comments (0)

Files changed (1)

 				}
 			} else {
 				// Something wrong ;(
-				return -1;
+				dlg_exiterr("ERROR: Trying push incorrect item!");
 			}
 			(void) wnoutrefresh(list);
 			(void) wmove(dialog, cur_y, cur_x);
 						break;
 					case DLGK_PAGE_NEXT:
 						i = MIN(choice + max_choice, item_no - scrollamt - 1);
-						if (items[scrollamt + i].type == ITEM_SEPARATE)
-							i++;
+						if (items[scrollamt + i].type == ITEM_SEPARATE) {
+							if (scrollamt + i + 1 < item_no)
+								i++;
+							else
+								i--;
+						}
 						break;
 					case DLGK_ITEM_PREV:
 						i = choice - 1;