From 4134fc9d569e10ef7b9733e0ec28045df38a0e1e 2013-11-04 19:29:38 From: Min RK Date: 2013-11-04 19:29:38 Subject: [PATCH] Merge pull request #4398 from Carreau/no-tooltip-on-tab [Notebook] Deactivate tooltip on tab by default. --- diff --git a/IPython/html/static/notebook/js/codecell.js b/IPython/html/static/notebook/js/codecell.js index 23e70c0..ea00928 100644 --- a/IPython/html/static/notebook/js/codecell.js +++ b/IPython/html/static/notebook/js/codecell.js @@ -209,12 +209,6 @@ var IPython = (function (IPython) { // Don't autocomplete if the part of the line before the cursor // is empty. In this case, let CodeMirror handle indentation. return false; - } else if ((pre_cursor.substr(-1) === "("|| pre_cursor.substr(-1) === " ") && IPython.config.tooltip_on_tab ) { - IPython.tooltip.request(that); - // Prevent the event from bubbling up. - event.stop(); - // Prevent CodeMirror from handling the tab. - return true; } else { event.stop(); this.completer.startCompletion(); diff --git a/IPython/html/static/notebook/js/config.js b/IPython/html/static/notebook/js/config.js index fc5bc7c..f300493 100644 --- a/IPython/html/static/notebook/js/config.js +++ b/IPython/html/static/notebook/js/config.js @@ -67,7 +67,6 @@ var IPython = (function (IPython) { 'diff' :{'reg':[/^diff/]} }, - tooltip_on_tab : true, }; // use the same method to merge user configuration diff --git a/docs/source/whatsnew/pr/tooltip-on-tab.rst b/docs/source/whatsnew/pr/tooltip-on-tab.rst new file mode 100644 index 0000000..ef8045e --- /dev/null +++ b/docs/source/whatsnew/pr/tooltip-on-tab.rst @@ -0,0 +1,3 @@ + * In notebook, Showing tooltip on tab has been disables to avoid conflict with + completion, Shift-Tab could still be used to invoke tooltip when inside + function signature and/or on selection. diff --git a/examples/notebooks/Part 1 - Running Code.ipynb b/examples/notebooks/Part 1 - Running Code.ipynb index 8816996..2721f1b 100644 --- a/examples/notebooks/Part 1 - Running Code.ipynb +++ b/examples/notebooks/Part 1 - Running Code.ipynb @@ -234,7 +234,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Tab completion after `(` brings up a tooltip with the docstring:" + "Shift-Tab on selection, or after `(` brings up a tooltip with the docstring:" ] }, { @@ -436,4 +436,4 @@ "metadata": {} } ] -} \ No newline at end of file +}