From faa6d63176c96ab6006368f09f15b59b09a8bc66 Mon Sep 17 00:00:00 2001 From: Matthias BUSSONNIER Date: Thu, 8 Aug 2013 11:17:33 +0200 Subject: [PATCH 1/2] complete on % for magic in notebook fixes #3954 --- IPython/html/static/notebook/js/completer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IPython/html/static/notebook/js/completer.js b/IPython/html/static/notebook/js/completer.js index 5386a4a7e..ff7df1965 100644 --- a/IPython/html/static/notebook/js/completer.js +++ b/IPython/html/static/notebook/js/completer.js @@ -102,7 +102,7 @@ var IPython = (function (IPython) { // we need to check that we are still on a word boundary // because while typing the completer is still reinvoking itself - if (!/[0-9a-z._/\\:~-]/i.test(pre_cursor)) { + if (!/[%0-9a-z._/\\:~-]/i.test(pre_cursor)) { this.close(); return; } From 57c5d901dc1727588f7934f42998b790d4a5f2f1 Mon Sep 17 00:00:00 2001 From: Matthias BUSSONNIER Date: Thu, 8 Aug 2013 15:59:42 +0200 Subject: [PATCH 2/2] fix completion when shared start among completion item is null --- IPython/html/static/notebook/js/completer.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/IPython/html/static/notebook/js/completer.js b/IPython/html/static/notebook/js/completer.js index ff7df1965..fd05a217d 100644 --- a/IPython/html/static/notebook/js/completer.js +++ b/IPython/html/static/notebook/js/completer.js @@ -53,7 +53,12 @@ var IPython = (function (IPython) { tem1 = tem1.substring(0, --s); } if (tem1 == "" || tem2.indexOf(tem1) != 0) { - return prepend_n_prc('', min_lead_prct); + return { + str:prepend_n_prc('', min_lead_prct), + type: "computed", + from: B[0].from, + to: B[0].to + } } return { str: prepend_n_prc(tem1, min_lead_prct),