diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2003-04-01 20:14:16 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2003-04-01 20:14:16 +0000 |
| commit | f5dd08a9b35140e804898c2024bf6701cdb67400 (patch) | |
| tree | 5fa777495a97941694981192ffa00abff9df9695 /src | |
| parent | cd339710f0b1c3bbaa080978f0e6ee01f4fdc204 (diff) | |
Fix cursor appearance and scrolling of Fl_Text_Editor (patches from Erco)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2964 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_Text_Editor.cxx | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/Fl_Text_Editor.cxx b/src/Fl_Text_Editor.cxx index 014e8afe2..5c1cbb102 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.14 2003/01/30 21:42:50 easysw Exp $" +// "$Id: Fl_Text_Editor.cxx,v 1.9.2.15 2003/04/01 20:14:16 easysw Exp $" // // Copyright 2001-2003 by Bill Spitzak and others. // Original code Copyright Mark Edel. Permission to distribute under @@ -266,9 +266,11 @@ int Fl_Text_Editor::kf_ctrl_move(int c, Fl_Text_Editor* e) { switch (c) { case FL_Home: e->insert_position(0); + e->scroll(0, 0); break; case FL_End: e->insert_position(e->buffer()->length()); + e->scroll(e->count_lines(0, e->buffer()->length(), 1), 0); break; case FL_Left: e->previous_word(); @@ -470,17 +472,16 @@ int Fl_Text_Editor::handle(int event) { if (when()&FL_WHEN_CHANGED) do_callback(); else set_changed(); return 1; -// CET - FIXME - this will clobber the window's current cursor state! -// case FL_ENTER: + case FL_ENTER: +// MRS: WIN32 only? Need to test! // case FL_MOVE: -// case FL_LEAVE: -// if (Fl::event_inside(text_area)) fl_cursor(FL_CURSOR_INSERT); -// else fl_cursor(FL_CURSOR_DEFAULT); + show_cursor(mCursorOn); + return 1; } return Fl_Text_Display::handle(event); } // -// End of "$Id: Fl_Text_Editor.cxx,v 1.9.2.14 2003/01/30 21:42:50 easysw Exp $". +// End of "$Id: Fl_Text_Editor.cxx,v 1.9.2.15 2003/04/01 20:14:16 easysw Exp $". // |
