Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Carlos Cordoba <[email protected]>
  • Loading branch information
athompson673 and ccordoba12 authored Jan 3, 2025
1 parent 22fc03a commit 5a79728
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,15 @@ def test_add_cursor(codeeditor, qtbot):
qtbot.keyClick(codeeditor, "b")
assert codeeditor.toPlainText() == "a01234b5a6789"


# Don't add another cursor on top of main cursor
click_at(codeeditor, qtbot, 7, ctrl=True, alt=True)
assert not bool(codeeditor.extra_cursors)

# Test removing cursors
click_at(codeeditor, qtbot, 2, ctrl=True, alt=True)


# Remove main cursor
click_at(codeeditor, qtbot, 2, ctrl=True, alt=True)
assert codeeditor.textCursor().position() == 7
Expand All @@ -105,6 +107,7 @@ def test_column_add_cursor(codeeditor, qtbot):
)
codeeditor.setTextCursor(cursor)


# Column cursor click at top row 6th column
click_at(codeeditor, qtbot, 6, ctrl=True, alt=True, shift=True)

Expand Down Expand Up @@ -162,6 +165,7 @@ def test_multi_cursor_verticalMovementX(codeeditor, qtbot):
assert codeeditor.extra_cursors[0].position() == 25
assert codeeditor.textCursor().position() == 35


for _ in range(3):
qtbot.keyClick(codeeditor, Qt.Key.Key_Up)
assert codeeditor.extra_cursors[0].position() == 4
Expand Down

0 comments on commit 5a79728

Please sign in to comment.