diff options
| author | Eli Zaretskii | 2013-10-03 23:13:15 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2013-10-03 23:13:15 +0300 |
| commit | 6270e29ea3692882ce1ceee9be222b59b993c0e6 (patch) | |
| tree | 42060818fd94e16d8f9b2fd5632e088f95dd505e /src | |
| parent | 2b2d19f218e9762f05f857872ed2b12f1da10a98 (diff) | |
| download | emacs-6270e29ea3692882ce1ceee9be222b59b993c0e6.tar.gz emacs-6270e29ea3692882ce1ceee9be222b59b993c0e6.zip | |
Fix hiding cursor when displaying menu on a TTY.
Diffstat (limited to 'src')
| -rw-r--r-- | src/term.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/term.c b/src/term.c index 9d93416a4c8..d5c5f6ed796 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -3315,15 +3315,15 @@ tty_menu_activate (tty_menu *menu, int *pane, int *selidx, | |||
| 3315 | state[0].menu = menu; | 3315 | state[0].menu = menu; |
| 3316 | state[0].screen_behind = save_and_enable_current_matrix (sf); | 3316 | state[0].screen_behind = save_and_enable_current_matrix (sf); |
| 3317 | 3317 | ||
| 3318 | /* Turn off the cursor. Otherwise it shows through the menu | ||
| 3319 | panes, which is ugly. */ | ||
| 3320 | tty_hide_cursor (tty); | ||
| 3321 | |||
| 3322 | /* Display the menu title. We subtract 1 from x0 and y0 because we | 3318 | /* Display the menu title. We subtract 1 from x0 and y0 because we |
| 3323 | want to interpret them as zero-based column and row coordinates, | 3319 | want to interpret them as zero-based column and row coordinates, |
| 3324 | and also because we want the first item of the menu, not its | 3320 | and also because we want the first item of the menu, not its |
| 3325 | title, to appear at x0,y0. */ | 3321 | title, to appear at x0,y0. */ |
| 3326 | tty_menu_display (menu, x0 - 1, y0 - 1, 1, title_faces, x0 - 1, y0 - 1, 0); | 3322 | tty_menu_display (menu, x0 - 1, y0 - 1, 1, title_faces, x0 - 1, y0 - 1, 0); |
| 3323 | |||
| 3324 | /* Turn off the cursor. Otherwise it shows through the menu | ||
| 3325 | panes, which is ugly. */ | ||
| 3326 | tty_hide_cursor (tty); | ||
| 3327 | if (buffers_num_deleted) | 3327 | if (buffers_num_deleted) |
| 3328 | menu->text[0][7] = ' '; | 3328 | menu->text[0][7] = ' '; |
| 3329 | if ((onepane = menu->count == 1 && menu->submenu[0])) | 3329 | if ((onepane = menu->count == 1 && menu->submenu[0])) |
| @@ -3415,6 +3415,8 @@ tty_menu_activate (tty_menu *menu, int *pane, int *selidx, | |||
| 3415 | state[statecount - 1].y, | 3415 | state[statecount - 1].y, |
| 3416 | state[statecount - 1].pane, | 3416 | state[statecount - 1].pane, |
| 3417 | faces, x, y, 1); | 3417 | faces, x, y, 1); |
| 3418 | tty_hide_cursor (tty); | ||
| 3419 | fflush (tty->output); | ||
| 3418 | } | 3420 | } |
| 3419 | 3421 | ||
| 3420 | /* Display the help-echo message for the currently-selected menu | 3422 | /* Display the help-echo message for the currently-selected menu |
| @@ -3425,6 +3427,7 @@ tty_menu_activate (tty_menu *menu, int *pane, int *selidx, | |||
| 3425 | help_callback (menu_help_message, | 3427 | help_callback (menu_help_message, |
| 3426 | menu_help_paneno, menu_help_itemno); | 3428 | menu_help_paneno, menu_help_itemno); |
| 3427 | tty_hide_cursor (tty); | 3429 | tty_hide_cursor (tty); |
| 3430 | fflush (tty->output); | ||
| 3428 | prev_menu_help_message = menu_help_message; | 3431 | prev_menu_help_message = menu_help_message; |
| 3429 | } | 3432 | } |
| 3430 | } | 3433 | } |