diff options
| author | Eli Zaretskii | 2008-09-06 13:43:36 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2008-09-06 13:43:36 +0000 |
| commit | 2de7397f328dca71014a534fcf1c2a0e14f8f5d5 (patch) | |
| tree | 83b8a472a79f238faa9dcc70cab7cf6a02198f06 /src | |
| parent | 08792c113a276f9b4ae032decfdb0ce1289e1380 (diff) | |
| download | emacs-2de7397f328dca71014a534fcf1c2a0e14f8f5d5.tar.gz emacs-2de7397f328dca71014a534fcf1c2a0e14f8f5d5.zip | |
(xmenu_show) [!HAVE_X_WINDOWS]: If frame has a minibuffer, don't let lower
part of menu invade the echo area.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 3 | ||||
| -rw-r--r-- | src/xmenu.c | 17 |
2 files changed, 20 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 018bcd399c1..27473dd0f66 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2008-09-06 Eli Zaretskii <eliz@gnu.org> | 1 | 2008-09-06 Eli Zaretskii <eliz@gnu.org> |
| 2 | 2 | ||
| 3 | * xmenu.c (xmenu_show) [!HAVE_X_WINDOWS]: If frame has a | ||
| 4 | minibuffer, don't let lower part of menu invade the echo area. | ||
| 5 | |||
| 3 | * msdos.c (IT_menu_display): Use STRING_CHAR_ADVANCE instead of a | 6 | * msdos.c (IT_menu_display): Use STRING_CHAR_ADVANCE instead of a |
| 4 | "char *q" to access menu text and advance through it. Revert the | 7 | "char *q" to access menu text and advance through it. Revert the |
| 5 | change that displayed ">" instead of ASCII character 0x10. | 8 | change that displayed ">" instead of ASCII character 0x10. |
diff --git a/src/xmenu.c b/src/xmenu.c index fee66df9c0d..5cc92422007 100644 --- a/src/xmenu.c +++ b/src/xmenu.c | |||
| @@ -2775,6 +2775,23 @@ xmenu_show (f, x, y, for_click, keymaps, title, error) | |||
| 2775 | y -= (uly + height) - dispheight; | 2775 | y -= (uly + height) - dispheight; |
| 2776 | uly = dispheight - height; | 2776 | uly = dispheight - height; |
| 2777 | } | 2777 | } |
| 2778 | #ifndef HAVE_X_WINDOWS | ||
| 2779 | if (FRAME_HAS_MINIBUF_P (f) && uly+height > dispheight - 1) | ||
| 2780 | { | ||
| 2781 | /* Move the menu away of the echo area, to avoid overwriting the | ||
| 2782 | menu with help echo messages or vice versa. */ | ||
| 2783 | if (BUFFERP (echo_area_buffer[0]) && WINDOWP (echo_area_window)) | ||
| 2784 | { | ||
| 2785 | y -= WINDOW_TOTAL_LINES (XWINDOW (echo_area_window)); | ||
| 2786 | uly -= WINDOW_TOTAL_LINES (XWINDOW (echo_area_window)); | ||
| 2787 | } | ||
| 2788 | else | ||
| 2789 | { | ||
| 2790 | y--; | ||
| 2791 | uly--; | ||
| 2792 | } | ||
| 2793 | } | ||
| 2794 | #endif | ||
| 2778 | if (ulx < 0) x -= ulx; | 2795 | if (ulx < 0) x -= ulx; |
| 2779 | if (uly < 0) y -= uly; | 2796 | if (uly < 0) y -= uly; |
| 2780 | 2797 | ||