Skip to content

Commit

Permalink
Check for empty history in setSelectionAddToHistory
Browse files Browse the repository at this point in the history
Issue #1961
  • Loading branch information
marijnh committed Nov 25, 2013
1 parent ab4ef60 commit cf2dc20
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/codemirror.js
Original file line number Diff line number Diff line change
Expand Up @@ -2717,7 +2717,8 @@

function setSelectionAddToHistory(doc, sel) {
setSelection(doc, sel);
lst(doc.history.done).selAfter = sel;
var lstSel = lst(doc.history.done);
if (lstSel) lstSel.selAfter = sel;
}

function filterSelectionChange(doc, sel) {
Expand Down

0 comments on commit cf2dc20

Please sign in to comment.