From 521f7b3c5b39e1dc6c0560869d811a6730554eca Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Mon, 26 Jan 2026 09:17:18 +0100 Subject: Let text widgets handle gracefully composed unicode characters - Cont'd. This commit adds support of another type of composed characters: flags. It also fixes Fl_Text_Buffer::prev_char() and Fl_Text_Buffer::next_char() that must use Fl_Text_Buffer::byte_at() to access to the content of the text buffer. --- FL/Fl_Text_Buffer.H | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'FL') diff --git a/FL/Fl_Text_Buffer.H b/FL/Fl_Text_Buffer.H index d74ddfc79..a9365d5c0 100644 --- a/FL/Fl_Text_Buffer.H +++ b/FL/Fl_Text_Buffer.H @@ -742,19 +742,11 @@ public: */ const Fl_Text_Selection* highlight_selection() const { return &mHighlight; } - /** - Returns the index of the previous character. - \param ix index to the current character - */ - int prev_char(int ix) const; - int prev_char_clipped(int ix) const; + int prev_char(int pos) const; + int prev_char_clipped(int pos) const; - /** - Returns the index of the next character. - \param ix index to the current character - */ - int next_char(int ix) const; - int next_char_clipped(int ix) const; + int next_char(int pos) const; + int next_char_clipped(int pos) const; /** Align an index into the buffer to the current or previous UTF-8 boundary. -- cgit v1.2.3