diff options
| author | Bill Spitzak <spitzak@gmail.com> | 1999-03-02 07:03:15 +0000 |
|---|---|---|
| committer | Bill Spitzak <spitzak@gmail.com> | 1999-03-02 07:03:15 +0000 |
| commit | 4df7511b18e6f90c3a167801b78755081cbaaef8 (patch) | |
| tree | 26e8abf8f5bec29d7702726de4db2b660f9bd4f8 /src | |
| parent | 32291ad0d5d9312534fa3c061c13535a38fa5a2c (diff) | |
Didn't like yesterday's fix, I changed it so that zero-length selections
are allowed. Warning: untested on WIN32 (although it seems likely that
it will work).
git-svn-id: file:///fltk/svn/fltk/trunk@349 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_Input_.cxx | 9 | ||||
| -rw-r--r-- | src/Fl_cutpaste.cxx | 6 | ||||
| -rw-r--r-- | src/Fl_cutpaste_win32.cxx | 6 |
3 files changed, 9 insertions, 12 deletions
diff --git a/src/Fl_Input_.cxx b/src/Fl_Input_.cxx index 68a6b4466..4b6da8259 100644 --- a/src/Fl_Input_.cxx +++ b/src/Fl_Input_.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Input_.cxx,v 1.19 1999/03/01 03:44:30 bill Exp $" +// "$Id: Fl_Input_.cxx,v 1.20 1999/03/02 07:03:14 bill Exp $" // // Common input widget routines for the Fast Light Tool Kit (FLTK). // @@ -436,10 +436,7 @@ int Fl_Input_::copy() { } else { e = position(); b = mark(); } - if (type()!=FL_SECRET_INPUT) - Fl::selection(*this, value()+b, e-b); - else - Fl::selection(*this, "*", 1); + Fl::selection(*this, value()+b, (type()!=FL_SECRET_INPUT) ? e-b : 0); return 1; } return 0; @@ -736,5 +733,5 @@ Fl_Input_::~Fl_Input_() { } // -// End of "$Id: Fl_Input_.cxx,v 1.19 1999/03/01 03:44:30 bill Exp $". +// End of "$Id: Fl_Input_.cxx,v 1.20 1999/03/02 07:03:14 bill Exp $". // diff --git a/src/Fl_cutpaste.cxx b/src/Fl_cutpaste.cxx index abbffac8b..9aed5b426 100644 --- a/src/Fl_cutpaste.cxx +++ b/src/Fl_cutpaste.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_cutpaste.cxx,v 1.5 1999/01/07 19:17:31 mike Exp $" +// "$Id: Fl_cutpaste.cxx,v 1.6 1999/03/02 07:03:15 bill Exp $" // // Cut/paste code for the Fast Light Tool Kit (FLTK). // @@ -124,7 +124,7 @@ void Fl::paste(Fl_Widget &receiver) { // call this when you create a selection: void Fl::selection(Fl_Widget &owner, const char *stuff, int len) { - if (!stuff || len<=0) return; + if (!stuff || len<0) return; if (len+1 > selection_buffer_length) { delete[] selection_buffer; selection_buffer = new char[len+100]; @@ -149,5 +149,5 @@ void Fl::selection(Fl_Widget &owner, const char *stuff, int len) { #endif // -// End of "$Id: Fl_cutpaste.cxx,v 1.5 1999/01/07 19:17:31 mike Exp $". +// End of "$Id: Fl_cutpaste.cxx,v 1.6 1999/03/02 07:03:15 bill Exp $". // diff --git a/src/Fl_cutpaste_win32.cxx b/src/Fl_cutpaste_win32.cxx index a4b570ffb..d47e9b37e 100644 --- a/src/Fl_cutpaste_win32.cxx +++ b/src/Fl_cutpaste_win32.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_cutpaste_win32.cxx,v 1.4 1999/01/07 19:17:31 mike Exp $" +// "$Id: Fl_cutpaste_win32.cxx,v 1.5 1999/03/02 07:03:15 bill Exp $" // // WIN32 cut/paste for the Fast Light Tool Kit (FLTK). // @@ -76,7 +76,7 @@ static int selection_xevent_handler(int) { // call this when you create a selection: void Fl::selection(Fl_Widget &owner, const char *stuff, int len) { - if (!stuff || len<=0) return; + if (!stuff || len<0) return; if (len+1 > selection_buffer_length) { delete[] selection_buffer; selection_buffer = new char[len+100]; @@ -129,5 +129,5 @@ void Fl::paste(Fl_Widget &receiver) { } // -// End of "$Id: Fl_cutpaste_win32.cxx,v 1.4 1999/01/07 19:17:31 mike Exp $". +// End of "$Id: Fl_cutpaste_win32.cxx,v 1.5 1999/03/02 07:03:15 bill Exp $". // |
