##// END OF EJS Templates
Fix #4777 and #7887...
Fix #4777 and #7887 The function in charge of actually converting cursor offset to CodeMirror line number and character number was actually crashing when the cursor was at the last character (loop until undefined, then access length of variable, which is undefined). This was hiding a bug in which when you would completer to a single completion pressing tab after as-you-type filtering, the completion would be completed twice. The logic that was supposed to detect whether or not all completions had a common prefix was actually faulty as the common prefix used to be a string but was then changed to an object. Hence the logic to check whether or not there was actually a common prefix was always true, even for empty string, leading to the deletion of the line (replace by '') in some cases.

File last commit:

r20229:f3af2702 merge
r20538:ae7f6d6a
Show More
page.html
122 lines | 3.7 KiB | text/html | HtmlLexer
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>{% block title %}IPython Notebook{% endblock %}</title>
{% block favicon %}<link rel="shortcut icon" type="image/x-icon" href="{{static_url("base/images/favicon.ico") }}">{% endblock %}
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link rel="stylesheet" href="{{static_url("components/jquery-ui/themes/smoothness/jquery-ui.min.css") }}" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% block stylesheet %}
<link rel="stylesheet" href="{{ static_url("style/style.min.css") }}" type="text/css"/>
{% endblock %}
<link rel="stylesheet" href="{{ static_url("custom/custom.css") }}" type="text/css" />
<script src="{{static_url("components/es6-promise/promise.min.js")}}" type="text/javascript" charset="utf-8"></script>
<script src="{{static_url("components/requirejs/require.js") }}" type="text/javascript" charset="utf-8"></script>
<script>
require.config({
{% if version_hash %}
urlArgs: "v={{version_hash}}",
{% endif %}
baseUrl: '{{static_url("", include_version=False)}}',
paths: {
nbextensions : '{{ base_url }}nbextensions',
kernelspecs : '{{ base_url }}kernelspecs',
underscore : 'components/underscore/underscore-min',
backbone : 'components/backbone/backbone-min',
jquery: 'components/jquery/jquery.min',
bootstrap: 'components/bootstrap/js/bootstrap.min',
bootstraptour: 'components/bootstrap-tour/build/js/bootstrap-tour.min',
jqueryui: 'components/jquery-ui/ui/minified/jquery-ui.min',
moment: 'components/moment/moment',
codemirror: 'components/codemirror',
termjs: 'components/term.js/src/term',
},
shim: {
underscore: {
exports: '_'
},
backbone: {
deps: ["underscore", "jquery"],
exports: "Backbone"
},
bootstrap: {
deps: ["jquery"],
exports: "bootstrap"
},
bootstraptour: {
deps: ["bootstrap"],
exports: "Tour"
},
jqueryui: {
deps: ["jquery"],
exports: "$"
}
}
});
require.config({
map: {
'*':{
'contents': '{{ contents_js_source }}',
}
}
});
</script>
{% block meta %}
{% endblock %}
</head>
<body class="{% block bodyclasses %}{% endblock %}" {% block params %}{% endblock %}>
<noscript>
<div id='noscript'>
IPython Notebook requires JavaScript.<br>
Please enable it to proceed.
</div>
</noscript>
<div id="header">
<div id="header-container" class="container">
<div id="ipython_notebook" class="nav navbar-brand pull-left"><a href="{{default_url}}" title='dashboard'>{% block logo %}<img src='{{static_url("base/images/logo.png") }}' alt='Jupyter Notebook'/>{% endblock %}</a></div>
{% block login_widget %}
<span id="login_widget">
{% if logged_in %}
<button id="logout" class="btn btn-sm navbar-btn">Logout</button>
{% elif login_available and not logged_in %}
<button id="login" class="btn btn-sm navbar-btn">Login</button>
{% endif %}
</span>
{% endblock %}
{% block headercontainer %}
{% endblock %}
</div>
<div class="header-bar"></div>
{% block header %}
{% endblock %}
</div>
<div id="site">
{% block site %}
{% endblock %}
</div>
{% block after_site %}
{% endblock %}
{% block script %}
{% endblock %}
</body>
</html>