Permalink
Browse files

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

  • Loading branch information...
1 parent b538a4e commit afe0dfbbb9171aee8f43708469d20b7687999fd5 @mtaran-google mtaran-google committed with marijnh Jan 28, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 addon/comment/continuecomment.js
@@ -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 comments on commit afe0dfb

Please sign in to comment.