Skip to content

Commit

Permalink
Merge pull request #22618 from dalthviz/fix_autoindent_test
Browse files Browse the repository at this point in the history
PR: Fix `test_copy_paste_autoindent` forcing text over the clipboard to work (Editor)
  • Loading branch information
ccordoba12 authored Oct 1, 2024
2 parents d49103b + 09a1464 commit 677ba4a
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -469,10 +469,8 @@ def test_copy_paste_autoindent(codeeditor):
# Copy
cursor = editor.textCursor()
cursor.setPosition(30)
cursor.setPosition(59, QTextCursor.KeepAnchor)
cursor.setPosition(51, QTextCursor.KeepAnchor)
editor.setTextCursor(cursor)
cb = QApplication.clipboard()
cb.setText("d\n if e:\n f", mode=cb.Clipboard)
editor.copy()

d = {
Expand All @@ -495,10 +493,8 @@ def test_copy_paste_autoindent(codeeditor):
# Copy
cursor = editor.textCursor()
cursor.setPosition(30-4)
cursor.setPosition(59, QTextCursor.KeepAnchor)
cursor.setPosition(51, QTextCursor.KeepAnchor)
editor.setTextCursor(cursor)
cb = QApplication.clipboard()
cb.setText(" d\n if e:\n f", mode=cb.Clipboard)
editor.copy()

d = {
Expand Down

0 comments on commit 677ba4a

Please sign in to comment.