do not count "\n" as part of indent

This commit is contained in:
Ekaterina Tuzova
2013-02-18 15:07:41 +04:00
parent 8aacebde20
commit 105fe1507f
5 changed files with 20 additions and 1 deletions
@@ -42,7 +42,7 @@ public class PythonCopyPasteProcessor implements CopyPastePreProcessor {
CodeStyleSettingsManager.getSettings(project).useTabCharacter(PythonFileType.INSTANCE);
CharFilter NOT_INDENT_FILTER = new CharFilter() {
public boolean accept(char ch) {
return useTabs? ch != '\t' : !Character.isWhitespace(ch);
return useTabs? ch != '\t' : ch != ' ';
}
};
final CaretModel caretModel = editor.getCaretModel();
@@ -0,0 +1,7 @@
a = 1
d = {
'a': 1,
}
b = 2
@@ -0,0 +1,3 @@
a = 1
<caret>
b = 2
@@ -0,0 +1,5 @@
<caret><selection>
d = {
'a': 1,
}
</selection>
@@ -269,6 +269,10 @@ public class PyCopyPasteTest extends PyTestCase {
doTest();
}
public void testDictionary() { //PY-8875
doTest();
}
public void testIndentTab() {
doTestTabs();
}