Pager is not activated if the pager text is empty.

* Things like asdf.*? used to open the pager even though there
  was nothing to show.
This commit is contained in:
Brian E. Granger 2011-08-15 14:25:49 -07:00
parent a086fc6d83
commit 726f8c1780

View File

@ -535,9 +535,11 @@ var IPython = (function (IPython) {
var l = payload.length;
for (var i=0; i<l; i++) {
if (payload[i].source === 'IPython.zmq.page.page') {
IPython.pager.clear();
IPython.pager.expand();
IPython.pager.append_text(payload[i].text);
if (payload[i].text.trim() !== '') {
IPython.pager.clear();
IPython.pager.expand();
IPython.pager.append_text(payload[i].text);
}
} else if (payload[i].source === 'IPython.zmq.zmqshell.ZMQInteractiveShell.set_next_input') {
var index = this.find_cell_index(cell);
var new_cell = this.insert_code_cell_after(index);