Dennis Preiser
2011-05-11 19:28:48 UTC
When scrolling up in 'm'enu (and attributes menu), last_option_on_screen
is set incorrectly if there are not option_lines_per_page options on the
last page.
Steps to reproduce:
1. invoke the 'm'enu
2. page down to the last page (if the last page is entirely filled with
options enlarge the window and page down again until the last page is
not entirely filled with options)
3. scroll three or four lines up (cursor up)
4. scroll down (cursor down)
!USE_CURSES case: The last option disappears immediately after each
keypress in step 3.
USE_CURSES case: in step 4 the cursor does not reach the last option in
step 4. It remains three or four lines (depending on step 3) above the
last option and the entire screen scrolls up.
The patch below fixes this for me.
Dennis
--- tin-2.0.0_r2/src/options_menu.c 2011-05-08 11:53:02.000000000 +0200
+++ tin-2.0.0_r3/src/options_menu.c 2011-05-11 20:45:36.000000000 +0200
@@ -547,7 +547,7 @@ move_cursor(
if (cur_option < first_option_on_screen) {
/* move the markers one option up */
first_option_on_screen = cur_option;
- last_option_on_screen = prev_option(last_option_on_screen, TRUE);
+ set_last_option_on_screen(cur_option);
#ifdef USE_CURSES
do_scroll(-1);
print_any_option(cur_option);
is set incorrectly if there are not option_lines_per_page options on the
last page.
Steps to reproduce:
1. invoke the 'm'enu
2. page down to the last page (if the last page is entirely filled with
options enlarge the window and page down again until the last page is
not entirely filled with options)
3. scroll three or four lines up (cursor up)
4. scroll down (cursor down)
!USE_CURSES case: The last option disappears immediately after each
keypress in step 3.
USE_CURSES case: in step 4 the cursor does not reach the last option in
step 4. It remains three or four lines (depending on step 3) above the
last option and the entire screen scrolls up.
The patch below fixes this for me.
Dennis
--- tin-2.0.0_r2/src/options_menu.c 2011-05-08 11:53:02.000000000 +0200
+++ tin-2.0.0_r3/src/options_menu.c 2011-05-11 20:45:36.000000000 +0200
@@ -547,7 +547,7 @@ move_cursor(
if (cur_option < first_option_on_screen) {
/* move the markers one option up */
first_option_on_screen = cur_option;
- last_option_on_screen = prev_option(last_option_on_screen, TRUE);
+ set_last_option_on_screen(cur_option);
#ifdef USE_CURSES
do_scroll(-1);
print_any_option(cur_option);