From 349b818d3fd4f568160537616857b9ff7d68d3aa Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Sat, 29 Nov 2025 12:57:08 +0100 Subject: Fluid: convert modal panels into tabs in the widget panel (#1339) --- src/Fl_Text_Buffer.cxx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src') 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 @@ -267,6 +267,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. */ -- cgit v1.2.3