summaryrefslogtreecommitdiff
path: root/src/Fl_Text_Buffer.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2025-11-29 12:57:08 +0100
committerGitHub <noreply@github.com>2025-11-29 12:57:08 +0100
commit349b818d3fd4f568160537616857b9ff7d68d3aa (patch)
treeaa4deb3b74345abf0dd6584bd9e3139c5812e43d /src/Fl_Text_Buffer.cxx
parent725be0116f1d4dbcd64a99b555572341f2d29eda (diff)
Fluid: convert modal panels into tabs in the widget panel (#1339)
Diffstat (limited to 'src/Fl_Text_Buffer.cxx')
-rw-r--r--src/Fl_Text_Buffer.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/Fl_Text_Buffer.cxx b/src/Fl_Text_Buffer.cxx
index f26afb39d..c33e36d3a 100644
--- a/src/Fl_Text_Buffer.cxx
+++ b/src/Fl_Text_Buffer.cxx
@@ -268,6 +268,21 @@ char *Fl_Text_Buffer::text() const {
/*
+ This function copies verbose whatever is in front and after the gap into a
+ single buffer.
+ */
+std::string Fl_Text_Buffer::text_str() const {
+ std::string t;
+ if (mLength) {
+ t.reserve(mLength);
+ t.insert(0, mBuf, mGapStart);
+ t.insert(mGapStart, mBuf+mGapEnd, mLength - mGapStart);
+ }
+ return t;
+}
+
+
+/*
Set the text buffer to a new string.
*/
void Fl_Text_Buffer::text(const char *t)