Skip to content

Commit

Permalink
Backport PR #22618 on branch 6.x (PR: Fix `test_copy_paste_autoindent…
Browse files Browse the repository at this point in the history
…` forcing text over the clipboard to work (Editor)) (#22619)

Co-authored-by: Carlos Cordoba <[email protected]>
  • Loading branch information
meeseeksmachine and ccordoba12 authored Oct 1, 2024
1 parent 8dbcfb1 commit dc08cbd
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 dc08cbd

Please sign in to comment.