Skip to content

Commit

Permalink
Pager is not activated if the pager text is empty.
Browse files Browse the repository at this point in the history
* Things like asdf.*? used to open the pager even though there
  was nothing to show.
  • Loading branch information
ellisonbg committed Aug 15, 2011
1 parent 50206b2 commit baf6e69
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions IPython/frontend/html/notebook/static/js/notebook.js
Expand Up @@ -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);
Expand Down

0 comments on commit baf6e69

Please sign in to comment.