Skip to content

Commit eb5d8a6

Browse files
committed
Add skipUpdateSelection
1 parent ccfbcf5 commit eb5d8a6

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Sources/CodeEditSourceEditor/Controller/TextViewController+IndentLines.swift

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ extension TextViewController {
8686
) {
8787
textView.replaceCharacters(
8888
in: NSRange(location: lineInfo.range.lowerBound, length: 0),
89-
with: indentationChars
89+
with: indentationChars,
90+
skipUpdateSelection: true
9091
)
9192
}
9293

@@ -102,7 +103,8 @@ extension TextViewController {
102103

103104
textView.replaceCharacters(
104105
in: NSRange(location: lineInfo.range.lowerBound, length: removeSpacesCount),
105-
with: ""
106+
with: "",
107+
skipUpdateSelection: true
106108
)
107109
}
108110

@@ -114,7 +116,8 @@ extension TextViewController {
114116
if lineContent.first == "\t" {
115117
textView.replaceCharacters(
116118
in: NSRange(location: lineInfo.range.lowerBound, length: 1),
117-
with: ""
119+
with: "",
120+
skipUpdateSelection: true
118121
)
119122
}
120123
}

0 commit comments

Comments
 (0)