mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
FIXED WEB-20285 IOOBE on creating Line Comment in the end of JS/TS file
This commit is contained in:
+3
-1
@@ -640,7 +640,9 @@ public class CommentByLineCommentHandler extends MultiCaretCodeInsightActionHand
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (block.addSpace && document.getCharsSequence().charAt(shiftedStartOffset) != '\n') {
|
||||
if (block.addSpace &&
|
||||
shiftedStartOffset < document.getTextLength() &&
|
||||
document.getCharsSequence().charAt(shiftedStartOffset) != '\n') {
|
||||
prefix += ' ';
|
||||
}
|
||||
document.insertString(offset, prefix);
|
||||
|
||||
Reference in New Issue
Block a user