mirror of
https://github.com/fltk/fltk.git
synced 2026-05-09 21:06:51 +08:00
Increase gap between cursor and widget border (#1414)
... of Fl_Input widgets. See discussion on issue #1414.
This commit is contained in:
+2
-2
@@ -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++;
|
||||
|
||||
Reference in New Issue
Block a user