Skip to content
Browse files

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.
  • Loading branch information...
1 parent 50206b2 commit baf6e69c4fa10ea56371256495dad93e15e0d284 @ellisonbg ellisonbg committed Aug 15, 2011
Showing with 5 additions and 3 deletions.
  1. +5 −3 IPython/frontend/html/notebook/static/js/notebook.js
View
8 IPython/frontend/html/notebook/static/js/notebook.js
@@ -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);

0 comments on commit baf6e69

Please sign in to comment.
Something went wrong with that request. Please try again.