From 9b8569ea3d602f48deaf541dfc27a8b413366cf6 2012-10-31 08:40:23 From: Bussonnier Matthias Date: 2012-10-31 08:40:23 Subject: [PATCH] Merge pull request #2498 from Carreau/fixes2487 Don't catch tab press when something selected allow to indent with 'tab' in some cases. --- diff --git a/IPython/frontend/html/notebook/static/js/codecell.js b/IPython/frontend/html/notebook/static/js/codecell.js index 857e8f5..bdba51c 100644 --- a/IPython/frontend/html/notebook/static/js/codecell.js +++ b/IPython/frontend/html/notebook/static/js/codecell.js @@ -123,6 +123,7 @@ var IPython = (function (IPython) { } else if (event.keyCode === key.TAB && event.type == 'keydown') { // Tab completion. //Do not trim here because of tooltip + if (editor.somethingSelected()){return false} var pre_cursor = editor.getRange({line:cur.line,ch:0},cur); if (pre_cursor.trim() === "") { // Don't autocomplete if the part of the line before the cursor