fixed PY-7599 Conflict with bin/pycharm64.exe.vmoptions upgrading from PyCharm 2.6.1 to 2.6.2

This commit is contained in:
Ekaterina Tuzova
2012-09-18 17:43:20 +04:00
parent 0cb3f450f5
commit 981c7a0021
5 changed files with 13 additions and 1 deletions
@@ -113,7 +113,7 @@ public class PythonCopyPasteProcessor implements CopyPastePreProcessor {
newText = new String(text); // to indent correctly (see PasteHandler)
}
if (element instanceof PsiWhiteSpace &&
if ((element instanceof PsiWhiteSpace || element.getTextOffset() == 0) &&
(StringUtil.countChars(element.getText(), '\n') <= 2 && !StringUtil.isEmptyOrSpaces(text))) {
newText += "\n";
}
@@ -0,0 +1,3 @@
a = 1
b = 2
a = 1
@@ -0,0 +1,2 @@
<caret>b = 2
a = 1
@@ -0,0 +1,3 @@
b = 2
<selection>a = 1
</selection>
@@ -255,6 +255,10 @@ public class PyCopyPasteTest extends PyTestCase {
doTest();
}
public void testBeginningOfFile() { //PY-7524
doTest();
}
private void doTest() {
String name = getTestName(false);