Created
September 13, 2023 19:43
-
-
Save michicc/59a204d99d0321ae4592b4b9d32ad93a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/textbuf.cpp b/src/textbuf.cpp | |
index 388e480211..59e8d69e23 100644 | |
--- a/src/textbuf.cpp | |
+++ b/src/textbuf.cpp | |
@@ -271,8 +271,10 @@ void Textbuf::DiscardMarkedText(bool update) | |
{ | |
if (this->markend == 0) return; | |
- this->DeleteText(this->markpos, this->markend, update); | |
+ uint16_t old_markpos = this->markpos; | |
+ uint16_t old_markend = this->markend; | |
this->markpos = this->markend = this->markxoffs = this->marklength = 0; | |
+ this->DeleteText(old_markpos, old_markend, update); | |
} | |
/** |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment