From 7aca1565649965855bda64b7a14dca4cfe29f982 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Tue, 23 Nov 2004 23:10:26 +0000 Subject: 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 --- src/Fl_Text_Display.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') 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 $". // -- cgit v1.2.3