[^yole] IDEA-83805 When duplicating a line, Ctrl+D moves cursor to the start of line

This commit is contained in:
peter
2012-03-30 20:35:22 +02:00
parent e0348013b8
commit 22db9ecd22
2 changed files with 21 additions and 7 deletions
@@ -20,6 +20,7 @@ xxx<caret>
private void doTest(String before, @NonNls String ext, String after) {
myFixture.configureByText("a." + ext, before);
myFixture.performEditorAction(IdeActions.ACTION_EDITOR_DUPLICATE)
println "/" + myFixture.editor.document.text.substring(myFixture.editor.caretModel.offset) + "/"
myFixture.checkResult(after);
}
@@ -33,6 +34,19 @@ class C {
void foo() {}
void <caret>foo() {}
}
'''
}
public void testXmlTag() {
doTest '''
<root>
<foo/><caret>
</root>
''', 'xml', '''
<root>
<foo/>
<foo/><caret>
</root>
'''
}
}