Increase gap between cursor and widget border (#1414)
Build and Test / build-linux (push) Has been cancelled
Build and Test / build-wayland (push) Has been cancelled
Build and Test / build-macos (push) Has been cancelled
Build and Test / build-windows (push) Has been cancelled

... of Fl_Input widgets. See discussion on issue #1414.
This commit is contained in:
Albrecht Schlosser
2026-04-26 19:08:36 +02:00
parent d2ed9a50cc
commit f1b81f8a55
+2 -2
View File
@@ -155,10 +155,10 @@ const char* Fl_Input_::expand(const char* p, char* buf) const {
} else while (o<e) {
if (wrap() && (p >= 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++;