mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
SASS indent-based comments support. Test added
#RUBY-10979 fixed
This commit is contained in:
+3
-2
@@ -118,8 +118,9 @@ public class BaseIndentEnterHandler extends EnterHandlerDelegateAdapter {
|
||||
if (type == myLineCommentType) {
|
||||
final String restString = editorCharSequence.subSequence(caret, document.getLineEndOffset(lineNumber)).toString();
|
||||
if (!StringUtil.isEmptyOrSpaces(restString)) {
|
||||
EditorModificationUtil.insertStringAtCaret(editor, "\n" + lineIndent + myLineCommentPrefix);
|
||||
editor.getCaretModel().moveToLogicalPosition(new LogicalPosition(lineNumber + 1, myLineCommentPrefix.length()));
|
||||
final String linePrefix = lineIndent + myLineCommentPrefix;
|
||||
EditorModificationUtil.insertStringAtCaret(editor, "\n" + linePrefix);
|
||||
editor.getCaretModel().moveToLogicalPosition(new LogicalPosition(lineNumber + 1, linePrefix.length()));
|
||||
return Result.Stop;
|
||||
}
|
||||
else if (iterator.getStart() < lineStartOffset) {
|
||||
|
||||
Reference in New Issue
Block a user