From 3b32463dc9d351180b68a4d82008a1b2b7d3a719 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Sat, 5 Jul 2025 16:03:14 +0200 Subject: Fl_Help_View: Improve comment --- src/Fl_Help_View.cxx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/Fl_Help_View.cxx') diff --git a/src/Fl_Help_View.cxx b/src/Fl_Help_View.cxx index 8bd3a8aa6..74c4ad527 100644 --- a/src/Fl_Help_View.cxx +++ b/src/Fl_Help_View.cxx @@ -606,7 +606,15 @@ int Fl_Help_View::do_align( /** - \brief Formats the help text. + \brief Formats the help text and lays out the HTML content for display. + + This function parses the HTML-like text buffer, breaks it into blocks and lines, + computes positions and sizes for each text and image element, manages links and targets, + and sets up the scrolling and rendering parameters for the widget. + + The main algorithm consists of an outer loop that may repeat if the computed content + exceeds the available width (to adjust hsize_), and an inner loop that parses the text, + handles tags, manages formatting state, and builds the layout structures. */ void Fl_Help_View::format() { int i; // Looping var @@ -3584,7 +3592,8 @@ void Fl_Help_View::select_all() { clear_selection(); if (!value_) return; - selection_drag_last_ = selection_last_ = (int) strlen(value_); + selection_first_ = 0; + selection_last_ = (int) strlen(value_); selected_ = true; } -- cgit v1.2.3