Skip to content

Commit b147fc2

Browse files
author
Christian Krebs
committed
DFL-3551 REPL throws on moving the cursor after completions were shown
1 parent c24dc96 commit b147fc2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/repl/repl_view.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,8 @@ cls.ReplView = function(id, name, container_class, html, default_handler) {
472472
this._highlight_completion = function(index)
473473
{
474474
var sel = window.getSelection();
475-
sel.collapseToStart();
475+
if (!sel.isCollapsed)
476+
sel.collapseToStart();
476477

477478
// with no arg, clear the selection.
478479
if (index === null || index === undefined) {

0 commit comments

Comments
 (0)