From: Eli Zaretskii Date: Wed, 18 Sep 2013 20:31:07 +0000 (+0300) Subject: Fixed minor issues with truncation of menu items. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1328^2~42 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a01f89afb472b9f032edc6c4eceb63f1a5690526;p=emacs.git Fixed minor issues with truncation of menu items. --- diff --git a/src/term.c b/src/term.c index a9498cf63c3..09e2765755f 100644 --- a/src/term.c +++ b/src/term.c @@ -3749,6 +3749,10 @@ tty_menu_show (struct frame *f, int x, int y, int for_click, int keymaps, if (ulx < 0) x -= ulx; if (uly < 0) y -= uly; +#if 0 + /* This code doesn't make sense on a TTY, since it can easily annul + the adjustments above that carefully avoid truncation of the menu + items. */ if (! for_click) { /* If position was not given by a mouse click, adjust so upper left @@ -3757,6 +3761,7 @@ tty_menu_show (struct frame *f, int x, int y, int for_click, int keymaps, x += width/2; y += 1.5*height/(maxlines+2); } +#endif pane = selidx = 0; diff --git a/src/xdisp.c b/src/xdisp.c index 4e0709c59d7..139218ae1dd 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -20646,7 +20646,7 @@ display_tty_menu_item (const char *item_text, int width, int face_id, init_iterator (&it, w, -1, -1, f->desired_matrix->rows + y, MENU_FACE_ID); it.first_visible_x = 0; - it.last_visible_x = FRAME_COLS (f); + it.last_visible_x = FRAME_COLS (f) - 1; row = it.glyph_row; /* Start with the row contents from the current matrix. */ deep_copy_glyph_row (row, f->current_matrix->rows + y);