diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2004-11-23 23:10:26 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2004-11-23 23:10:26 +0000 |
| commit | 7aca1565649965855bda64b7a14dca4cfe29f982 (patch) | |
| tree | c986420761044b7dae5f8c55f197730913a7704e /src | |
| parent | f26b5336a0d650b462149e566c148b54ab48205d (diff) | |
Fl_Text_Display would hang if the user pressed Ctrl-left with the cursor
in the first columna and line (pos 0)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3921 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_Text_Display.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx index d7c9447dd..58f644f9b 100644 --- a/src/Fl_Text_Display.cxx +++ b/src/Fl_Text_Display.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Text_Display.cxx,v 1.12.2.58 2004/11/20 03:44:17 easysw Exp $" +// "$Id: Fl_Text_Display.cxx,v 1.12.2.59 2004/11/23 23:10:26 matthiaswm Exp $" // // Copyright 2001-2004 by Bill Spitzak and others. // Original code Copyright Mark Edel. Permission to distribute under @@ -1154,6 +1154,7 @@ void Fl_Text_Display::next_word() { void Fl_Text_Display::previous_word() { int pos = insert_position(); + if (pos==0) return; pos--; while (pos && fl_isseparator(buffer()->character(pos))) { pos--; @@ -3148,5 +3149,5 @@ int Fl_Text_Display::handle(int event) { // -// End of "$Id: Fl_Text_Display.cxx,v 1.12.2.58 2004/11/20 03:44:17 easysw Exp $". +// End of "$Id: Fl_Text_Display.cxx,v 1.12.2.59 2004/11/23 23:10:26 matthiaswm Exp $". // |
