From f1b81f8a55b6b92ff23b2bc5dcc878c6ded5f413 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Sun, 26 Apr 2026 19:08:36 +0200 Subject: [PATCH] Increase gap between cursor and widget border (#1414) ... of Fl_Input widgets. See discussion on issue #1414. --- src/Fl_Input_.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Fl_Input_.cxx b/src/Fl_Input_.cxx index 42c0c0cf8..383440125 100644 --- a/src/Fl_Input_.cxx +++ b/src/Fl_Input_.cxx @@ -155,10 +155,10 @@ const char* Fl_Input_::expand(const char* p, char* buf) const { } else while (o= value_+size_ || isspace(*p & 255))) { - word_wrap = w() - Fl::box_dw(box()) - 4; + word_wrap = w() - Fl::box_dw(box()) - 5; // 5 == space for cursor + gap (#1414) width_to_lastspace += fl_width(lastspace_out, (int) (o-lastspace_out)); if (p > lastspace+1) { - if (word_count && (int)width_to_lastspace > word_wrap) { + if (word_count && ceil(width_to_lastspace) > word_wrap) { p = lastspace; o = lastspace_out; break; } word_count++;