summaryrefslogtreecommitdiff
path: root/src/Fl_Input_.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2009-04-14 08:18:52 +0000
committerMatthias Melcher <fltk@matthiasm.com>2009-04-14 08:18:52 +0000
commitb214cef3a8d2d9ecf0df7bef7d10dcdfbca4d9d3 (patch)
tree741fd9b76700b85d7aba4e4f9a1811d962076ca4 /src/Fl_Input_.cxx
parent32714c502c7b78e71f71c3c544f133ee2527ac4d (diff)
Implemented the full OS X navigation support for Fl_Input minus scrolling. Improved navigation on other systems (word fwd, backwd).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6764 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Input_.cxx')
-rw-r--r--src/Fl_Input_.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Fl_Input_.cxx b/src/Fl_Input_.cxx
index b3d148840..e82d8badb 100644
--- a/src/Fl_Input_.cxx
+++ b/src/Fl_Input_.cxx
@@ -364,6 +364,7 @@ static int isword(char c) {
int Fl_Input_::word_end(int i) const {
if (input_type() == FL_SECRET_INPUT) return size();
//while (i < size() && !isword(index(i))) i++;
+ while (i < size() && !isword(index(i))) i++;
while (i < size() && isword(index(i))) i++;
return i;
}
@@ -372,6 +373,7 @@ int Fl_Input_::word_start(int i) const {
if (input_type() == FL_SECRET_INPUT) return 0;
// if (i >= size() || !isword(index(i)))
// while (i > 0 && !isword(index(i-1))) i--;
+ while (i > 0 && !isword(index(i-1))) i--;
while (i > 0 && isword(index(i-1))) i--;
return i;
}