Skip to content
Snippets Groups Projects
Commit afe0dfbb authored by Maksym Taran's avatar Maksym Taran Committed by Marijn Haverbeke
Browse files

[continuecomment addon] Allow continuing block comment from first line.

parent b538a4ed
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,7 @@
if (mode.blockCommentStart && mode.blockCommentContinue) {
var end = token.string.indexOf(mode.blockCommentEnd);
var full = cm.getRange(CodeMirror.Pos(pos.line, 0), CodeMirror.Pos(pos.line, token.end)), found;
if (end != -1 && end == token.string.length - mode.blockCommentEnd.length) {
if (end != -1 && end == token.string.length - mode.blockCommentEnd.length && pos.ch >= end) {
// Comment ended, don't continue it
} else if (token.string.indexOf(mode.blockCommentStart) == 0) {
insert = full.slice(0, token.start);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment