mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-90457 Wrapping inserts two line breaks instead of one
Correct tab-less string processing
This commit is contained in:
@@ -39,6 +39,7 @@ public class JavaFormatterInEditorTest extends LightPlatformCodeInsightTestCase
|
||||
"\n" +
|
||||
"class <caret>Test {\n" +
|
||||
"}",
|
||||
|
||||
"import static java.util.concurrent\n" +
|
||||
" .atomic.AtomicInteger.*;\n" +
|
||||
"\n" +
|
||||
|
||||
@@ -342,6 +342,7 @@ public class CodeFormatterFacade {
|
||||
if (!hasTabs) {
|
||||
if (Math.min(endLineOffset, endOffsetToUse) - startLineOffset > mySettings.RIGHT_MARGIN) {
|
||||
preferredWrapPosition = startLineOffset + mySettings.RIGHT_MARGIN - FormatConstants.RESERVED_LINE_WRAP_WIDTH_IN_COLUMNS;
|
||||
wrapLine = true;
|
||||
}
|
||||
}
|
||||
else if (canOptimize) {
|
||||
|
||||
Reference in New Issue
Block a user