Skip to content

Commit

Permalink
(fix: #32) Fix Deleting Selected Range (#33)
Browse files Browse the repository at this point in the history
Fix selected range deletion
  • Loading branch information
thecoolwinter authored May 21, 2024
1 parent 39e5ae3 commit 80911be
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Sources/CodeEditTextView/TextView/TextView+Delete.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ extension TextView {
) {
/// Extend each selection by a distance specified by `destination`, then update both storage and the selection.
for textSelection in selectionManager.textSelections {
guard textSelection.range.isEmpty else { continue }
let extendedRange = selectionManager.rangeOfSelection(
from: textSelection.range.location,
direction: direction,
Expand Down

0 comments on commit 80911be

Please sign in to comment.