We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 606f55f commit afcbdb6Copy full SHA for afcbdb6
lib/codemirror.js
@@ -2507,7 +2507,7 @@
2507
var coords = coordsChar(cm, x, y), line;
2508
if (forRect && coords.xRel == 1 && (line = getLine(cm.doc, coords.line).text).length == coords.ch) {
2509
var colDiff = countColumn(line, line.length, cm.options.tabSize) - line.length;
2510
- coords = Pos(coords.line, Math.round((x - paddingH(cm.display).left) / charWidth(cm.display)) - colDiff);
+ coords = Pos(coords.line, Math.max(0, Math.round((x - paddingH(cm.display).left) / charWidth(cm.display)) - colDiff));
2511
}
2512
return coords;
2513
0 commit comments