mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-10 13:17:09 +07:00
CR-IC-41 Vertical line block match disapear view line in java code (IDEA-99572)
1. Limit 'shiftForward()' by line end offset; 2. Minor refactoring; 3. Don't show indent guide for commented lines which would remove indent on un-commenting;
This commit is contained in:
+8
-4
@@ -43,8 +43,8 @@ class Test {
|
||||
| //test();
|
||||
| if (true) {
|
||||
| | int i = 1;
|
||||
| | |
|
||||
//| | | comment;
|
||||
| |
|
||||
//| | int k;
|
||||
| | int j = 1;
|
||||
| }
|
||||
}
|
||||
@@ -141,8 +141,12 @@ class Test {
|
||||
myFixture.configureByText("${getTestName(false)}.java", testData.documentText)
|
||||
CodeInsightTestFixtureImpl.instantiateAndRun(myFixture.file, myFixture.editor, ArrayUtilRt.EMPTY_INT_ARRAY, false)
|
||||
IndentsModelImpl model = myFixture.editor.indentsModel as IndentsModelImpl
|
||||
assertEquals("expected to find ${testData.guides.size()} indent guide but got ${model.indents.size()}",
|
||||
testData.guides.size(), model.indents.size())
|
||||
assertEquals(
|
||||
"expected to find ${testData.guides.size()} indent guides (" +
|
||||
"${testData.guides.collect { startLine, endLine, level -> "$level ($startLine-$endLine)"}}) " +
|
||||
"but got ${model.indents.size()} (${model.indents})",
|
||||
testData.guides.size(), model.indents.size()
|
||||
)
|
||||
|
||||
testData.guides.each {
|
||||
def descriptor = model.getDescriptor(it[0], it[1])
|
||||
|
||||
Reference in New Issue
Block a user