Unified focus state save/restore mechanism for both buffer switching and minibuffer
commit4b9c34acb26118a970ec57c24d80fd7748639ffb
authorJeremy Maitin-Shepard <jeremy@jeremyms.com>
Sat, 9 Feb 2013 23:20:58 +0000 (9 15:20 -0800)
committerJeremy Maitin-Shepard <jeremy@jeremyms.com>
Sat, 9 Feb 2013 23:42:29 +0000 (9 15:42 -0800)
tree72379a9275b5384a7e40b526830ba23f5c77ec27
parent9e2a733a27094f5a2a51a14d03d3784cc377ebe5
Unified focus state save/restore mechanism for both buffer switching and minibuffer

This simplifies the code and makes it more robust to buffer switches
while the minibuffer is open.  This also reduces chance of bugs due to
code duplication (one in isearch.js was fixed).

This also incorporates a patch by Joren Van Onder <joren.vanonder@gmail.com>:
When opening a hyperlink with its target attribute set to "_blank" a
new buffer is opened. When there is no content handler for the
mimetype a content_handler_prompt is opened and the new (blank) buffer
is killed. saved_focused_frame then references a destroyed object.

A simple example of what used to trigger the bug (unless a content
handler for midi files is available):
<a href="a.mid" target="_blank">link</a>
modules/buffer.js
modules/isearch.js
modules/minibuffer.js