diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2010-04-05 21:10:40 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2010-04-05 21:10:40 +0000 |
| commit | 07a4509a63bfc06fca31972002e2861449df49c3 (patch) | |
| tree | 2910ad5fb66166fc347952949b06a58fd987c388 /src | |
| parent | 814da7f392144de2c61d40a052edffdd54523d0a (diff) | |
Validated utf-8 safety of Fl_Text_Selection.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7443 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_Text_Buffer.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Fl_Text_Buffer.cxx b/src/Fl_Text_Buffer.cxx index aa957e867..2b091ec95 100644 --- a/src/Fl_Text_Buffer.cxx +++ b/src/Fl_Text_Buffer.cxx @@ -1778,6 +1778,7 @@ int Fl_Text_Selection::position(int *startpos, int *endpos, } +// unicode safe int Fl_Text_Selection::includes(int pos, int lineStartPos, int dispIndex) const { return (selected() && ( (!rectangular() && pos >= start() && pos < end()) @@ -1999,6 +2000,8 @@ void Fl_Text_Buffer::update_selections(int pos, int nDeleted, mHighlight.update(pos, nDeleted, nInserted); } + +// unicode safe, assuming the arguments are on character boundaries void Fl_Text_Selection::update(int pos, int nDeleted, int nInserted) { if (!mSelected || pos > mEnd) |
