[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-24 r117037: * term.c (tty_menu_activate): Don't assu
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] emacs-24 r117037: * term.c (tty_menu_activate): Don't assume row and col are initialized. |
Date: |
Wed, 30 Apr 2014 17:54:30 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 117037
revision-id: address@hidden
parent: address@hidden
committer: Paul Eggert <address@hidden>
branch nick: emacs-24
timestamp: Wed 2014-04-30 10:54:27 -0700
message:
* term.c (tty_menu_activate): Don't assume row and col are initialized.
GCC 4.9.0 warned about this, and I couldn't easily prove to my own
satisfaction that they would always be initialized.
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/term.c term.c-20091113204419-o5vbwnq5f7feedwu-220
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2014-04-29 15:33:37 +0000
+++ b/src/ChangeLog 2014-04-30 17:54:27 +0000
@@ -1,3 +1,9 @@
+2014-04-30 Paul Eggert <address@hidden>
+
+ * term.c (tty_menu_activate): Don't assume row and col are initialized.
+ GCC 4.9.0 warned about this, and I couldn't easily prove to my own
+ satisfaction that they would always be initialized.
+
2014-04-29 Eli Zaretskii <address@hidden>
* term.c (tty_menu_display): Move the cursor to the active menu
=== modified file 'src/term.c'
--- a/src/term.c 2014-04-29 15:33:37 +0000
+++ b/src/term.c 2014-04-30 17:54:27 +0000
@@ -3378,6 +3378,8 @@
col = cursorX (tty);
row = cursorY (tty);
}
+ else
+ row = -1;
/* Display the help-echo message for the currently-selected menu
item. */
@@ -3389,7 +3391,8 @@
/* Move the cursor to the beginning of the current menu
item, so that screen readers and other accessibility aids
know where the active region is. */
- cursor_to (sf, row, col);
+ if (0 <= row)
+ cursor_to (sf, row, col);
tty_hide_cursor (tty);
fflush (tty->output);
prev_menu_help_message = menu_help_message;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-24 r117037: * term.c (tty_menu_activate): Don't assume row and col are initialized.,
Paul Eggert <=