Skip to content

Commit 0596f15

Browse files
committed
Fix addLineClass (and similar) returning null on no-op
When the call didn't result in an actual change (for example line already had the given class), changeLine would return null. This doesn't seem useful, and caused issue #2438. It now always returns the line handle (as documented). Conflicts: lib/codemirror.js
1 parent 27ee870 commit 0596f15

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

lib/codemirror.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2811,7 +2811,6 @@ window.CodeMirror = (function() {
28112811
else no = lineNo(handle);
28122812
if (no == null) return null;
28132813
if (op(line, no)) regChange(cm, no, no + 1);
2814-
else return null;
28152814
return line;
28162815
}
28172816

0 commit comments

Comments
 (0)