fixed PY-9337 Copy paste doesn't always preserve the relative indentation of what is pasted.

check if we need to add leading spaces to pasted text
This commit is contained in:
Ekaterina Tuzova
2013-04-09 19:31:15 +04:00
parent a9dffdc97c
commit b16f001f8f
5 changed files with 59 additions and 8 deletions
@@ -0,0 +1,15 @@
# original function # this is line 1 of the code.
def foo():
print 'f00'
def bar(num):
for _ in range(num):
print 'bar'
bar(7)
def bar(num):
for _ in range(num):
print 'bar'
bar(7)
@@ -0,0 +1,9 @@
# original function # this is line 1 of the code.
def foo():
print 'f00'
def bar(num):
for _ in range(num):
print 'bar'
bar(7)
<caret>
@@ -0,0 +1,10 @@
# original function # this is line 1 of the code.
def foo():
print 'f00'
<selection>def bar(num):
for _ in range(num):
print 'bar'
bar(7)</selection><caret>