summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2014-10-27 12:49:47 +0000
committerAlbrecht Schlosser <albrechts.fltk@online.de>2014-10-27 12:49:47 +0000
commit6b6f375af06653c26667c076bb937851ed4e90db (patch)
treea5c627ed733dc7b01484b40fc57845320ad0a201 /src
parentffdc36dcb690b458b240e90dfed06c27cb6a62bb (diff)
Fix documentation of Fl_Input_::word_start() and word_end().
Documentation changes in svn r10383 (STR #3014) said that this would skip "space-separated" words, which is not true. Note: The set of word separators is currently not documented, it is inconsistent with Fl_Text_Display/Fl_Text_Editor, and not UTF-8-aware. Also, word selection and the above methods use different word delimiters. This should be fixed in a later release (after 1.3.3). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10394 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Input_.cxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/Fl_Input_.cxx b/src/Fl_Input_.cxx
index a9caa5262..1dd104fc9 100644
--- a/src/Fl_Input_.cxx
+++ b/src/Fl_Input_.cxx
@@ -419,7 +419,7 @@ void Fl_Input_::drawtext(int X, int Y, int W, int H) {
/** \internal
Simple function that determines if a character could be part of a word.
- \todo This function is not ucs4-aware.
+ \todo This function is not UTF-8-aware.
*/
static int isword(char c) {
return (c&128 || isalnum(c) || strchr("#%&-/@\\_~", c));
@@ -428,9 +428,10 @@ static int isword(char c) {
/**
Finds the end of a word.
- Returns the index after the last byte of a space-separated word. This
- first skips spaces, and then non-spaces, so if you call it repeatedly
- you will move forwards to the end of the text.
+ Returns the index after the last byte of a word.
+ If the index is already at the end of a word, it will find the
+ end of the following word, so if you call it repeatedly you will
+ move forwards to the end of the text.
Note that this is inconsistent with line_end().
@@ -447,8 +448,8 @@ int Fl_Input_::word_end(int i) const {
/**
Finds the start of a word.
- Returns the index of the first byte of a space-separated word.
- If the index is already at the beginning of the word, it will find the
+ Returns the index of the first byte of a word.
+ If the index is already at the beginning of a word, it will find the
beginning of the previous word, so if you call it repeatedly you will
move backwards to the beginning of the text.