aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Document.cxx
diff options
context:
space:
mode:
authorZufu Liu <unknown>2025-05-18 09:24:34 +1000
committerZufu Liu <unknown>2025-05-18 09:24:34 +1000
commit89e74637ef701d63828ef39bc16fb85323f0413c (patch)
treea6b99908ce4373d60fd1a4f84c0ec06958bbec3c /src/Document.cxx
parentaefa36e90bb7d11881138ec6acd82f245f2c346d (diff)
downloadscintilla-mirror-89e74637ef701d63828ef39bc16fb85323f0413c.tar.gz
Modify wrapping fix to be more efficient.
https://github.com/notepad-plus-plus/notepad-plus-plus/pull/16373
Diffstat (limited to 'src/Document.cxx')
-rw-r--r--src/Document.cxx6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/Document.cxx b/src/Document.cxx
index 7dbe499a2..e6f8f3543 100644
--- a/src/Document.cxx
+++ b/src/Document.cxx
@@ -1314,16 +1314,10 @@ bool Scintilla::Internal::DiscardLastCombinedCharacter(std::string_view &text) n
// Modified to move Sk (Symbol Modifier) from ccs-base to ccs-extend to preserve modified emoji
// May break before and after Control which is defined as most of ccC? but not some of ccCf and ccCn
// so treat ccCc, ccCs, ccCo as base for now.
- // Treat \r\n as a single item to avoid separating the characters.
std::string_view truncated = text;
while (truncated.length() > UTF8MaxBytes) {
// Give up when short
- if (truncated.substr(truncated.length()-2) == "\r\n") {
- truncated.remove_suffix(2);
- text = truncated;
- return true;
- }
const CharacterExtracted ce = LastCharacter(truncated);
const CharacterCategory cc = CategoriseCharacter(static_cast<int>(ce.character));
truncated.remove_suffix(ce.widthBytes);