aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Document.h
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2022-11-22 09:24:07 +1100
committerNeil <nyamatongwe@gmail.com>2022-11-22 09:24:07 +1100
commitcb8cd73d839a96f98bb1ce887c694271f9c24788 (patch)
tree1920fae848da38e7942ea9a36c21f87272254e23 /src/Document.h
parentb3e46461ce564d295b629a1d16dc4cee60722e66 (diff)
downloadscintilla-mirror-cb8cd73d839a96f98bb1ce887c694271f9c24788.tar.gz
Add SCI_REPLACETARGETMINIMAL to change text without causing unchanged prefix and
suffix to be marked as modified in change history.
Diffstat (limited to 'src/Document.h')
-rw-r--r--src/Document.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Document.h b/src/Document.h
index ae784180a..ac9c6670c 100644
--- a/src/Document.h
+++ b/src/Document.h
@@ -46,6 +46,10 @@ public:
return (start != Sci::invalidPosition) && (end != Sci::invalidPosition);
}
+ [[nodiscard]] bool Empty() const noexcept {
+ return start == end;
+ }
+
Sci::Position First() const noexcept {
return (start <= end) ? start : end;
}
@@ -369,6 +373,7 @@ public:
// Gateways to modifying document
void ModifiedAt(Sci::Position pos) noexcept;
void CheckReadOnly();
+ void TrimReplacement(std::string_view &text, Range &range) const noexcept;
bool DeleteChars(Sci::Position pos, Sci::Position len);
Sci::Position InsertString(Sci::Position position, const char *s, Sci::Position insertLength);
Sci::Position InsertString(Sci::Position position, std::string_view sv);