~ubuntu-branches/ubuntu/oneiric/codelite/oneiric

« back to all changes in this revision

Viewing changes to sdk/wxscintilla/src/scintilla/src/Selection.cxx

  • Committer: Bazaar Package Importer
  • Author(s): Alessio Treglia
  • Date: 2010-04-09 02:03:19 UTC
  • mfrom: (0.1.3 sid) (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20100409020319-302693n3vroavxwe
Tags: 2.5.2.4031~dfsg-1
* New upstream release.
* Refresh patches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
179
179
        return rangeRectangular;
180
180
}
181
181
 
 
182
SelectionSegment Selection::Limits() const {
 
183
        if (ranges.empty()) {
 
184
                return SelectionSegment();
 
185
        } else {
 
186
                SelectionSegment sr(ranges[0].anchor, ranges[0].caret);
 
187
                for (size_t i=1; i<ranges.size(); i++) {
 
188
                        sr.Extend(ranges[i].anchor);
 
189
                        sr.Extend(ranges[i].caret);
 
190
                }
 
191
                return sr;
 
192
        }
 
193
}
 
194
 
182
195
size_t Selection::Count() const {
183
196
        return ranges.size();
184
197
}