Files
openide/python/testData/copyPaste/BeginningOfIndentedLinePrecededByPastedWord.dst.py
Mikhail Golubev 6d4bc430c3 PY-22563 Remove indent before the caret from re-indented text being pasted
Otherwise, we end up duplicating it.

This logic shouldn't apply if the fragment being pasted will be inserted on
the previous line which should actually happen only if there was no selection
in the editor, just the caret preceding a line -- I additionally enforced
this requirement.

Added tests covering the original issue and some of its duplicates (PY-29506).
2018-12-20 13:54:40 +03:00

10 lines
432 B
Python

def func():
for des_name, comp in keys_to_delete:
cc_list = cell_classes_by_comp_dict[comp]
if len(cc_list) == 1:
del cell_classes_by_comp_dict[comp]
else:
new_cc_list = [cc for cc in cc_list if cc.design_name != des_name]
cell_classes_by_comp_dict[comp] = copy.deepcopy(new_cc_list)
<caret>cell_classes_by_comp_dict = \
deepcopy(cell_classes_by_comp_dict)