diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-11-08 15:57:10 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-11-08 15:57:10 +0000 |
| commit | 4f15037e8ea8e32abe01e764f97edfb9341534a7 (patch) | |
| tree | ed94885669191b463eaaad712667ad9ae13b7b88 /src/Fl_Text_Editor.cxx | |
| parent | e5cdd193b2f57bb55851eb6bba764003ea01ffe5 (diff) | |
Tab moves forward in menu, Shift-Tab moves backward.
CTRL-V no longer segfaults Fl_Text_Editor when the clipboard is empty.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2830 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Text_Editor.cxx')
| -rw-r--r-- | src/Fl_Text_Editor.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/Fl_Text_Editor.cxx b/src/Fl_Text_Editor.cxx index eda8a0adb..45addf089 100644 --- a/src/Fl_Text_Editor.cxx +++ b/src/Fl_Text_Editor.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Text_Editor.cxx,v 1.9.2.12 2002/11/05 19:53:50 matthiaswm Exp $" +// "$Id: Fl_Text_Editor.cxx,v 1.9.2.13 2002/11/08 15:57:10 easysw Exp $" // // Copyright 2001-2002 by Bill Spitzak and others. // Original code Copyright Mark Edel. Permission to distribute under @@ -29,6 +29,7 @@ #include <ctype.h> #include <FL/Fl.H> #include <FL/Fl_Text_Editor.H> +#include <FL/fl_ask.H> Fl_Text_Editor::Fl_Text_Editor(int X, int Y, int W, int H, const char* l) @@ -458,6 +459,10 @@ int Fl_Text_Editor::handle(int event) { return handle_key(); case FL_PASTE: + if (!Fl::event_text()) { + fl_beep(); + return 1; + } buffer()->remove_selection(); if (insert_mode()) insert(Fl::event_text()); else overstrike(Fl::event_text()); @@ -477,5 +482,5 @@ int Fl_Text_Editor::handle(int event) { } // -// End of "$Id: Fl_Text_Editor.cxx,v 1.9.2.12 2002/11/05 19:53:50 matthiaswm Exp $". +// End of "$Id: Fl_Text_Editor.cxx,v 1.9.2.13 2002/11/08 15:57:10 easysw Exp $". // |
