mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
do not count "\n" as part of indent
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user