From baf6e69c4fa10ea56371256495dad93e15e0d284 2011-08-15 21:25:49 From: Brian E. Granger <ellisonbg@gmail.com> Date: 2011-08-15 21:25:49 Subject: [PATCH] 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. --- diff --git a/IPython/frontend/html/notebook/static/js/notebook.js b/IPython/frontend/html/notebook/static/js/notebook.js index 2c2fd5a..64b2eb4 100644 --- a/IPython/frontend/html/notebook/static/js/notebook.js +++ b/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);