fix CR-IC-97 (indent is counted in tab units so need multiplication instead of division)

handle empty insertion line properly
This commit is contained in:
Ekaterina Tuzova
2013-02-15 19:47:10 +04:00
parent 9da8b5d6e1
commit 2a2166092c
4 changed files with 24 additions and 0 deletions
@@ -0,0 +1,6 @@
print "Line 2"
class Test:
def __init__(self):
print "Line 2"
print "Line 1"
@@ -0,0 +1,5 @@
print "Line 2"
class Test:
def __init__(self):
<caret>
print "Line 1"
@@ -0,0 +1,5 @@
<selection>print "Line 2"
</selection><caret>
class Test:
def __init__(self):
print "Line 1"
@@ -270,6 +270,10 @@ public class PyCopyPasteTest extends PyTestCase {
}
public void testIndentTab() {
doTestTabs();
}
private void doTestTabs() {
final CommonCodeStyleSettings.IndentOptions indentOptions =
CodeStyleSettingsManager.getSettings(myFixture.getProject())
.getIndentOptions(PythonFileType.INSTANCE);
@@ -282,6 +286,10 @@ public class PyCopyPasteTest extends PyTestCase {
}
}
public void testIndentTabIncrease() {
doTestTabs();
}
private void doTest() {
String name = getTestName(false);