~ubuntu-branches/ubuntu/maverick/codelite/maverick

« 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-07-29 19:42:47 UTC
  • mfrom: (1.1.9 upstream) (18.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20100729194247-cuibfk03wog33nxq
Tags: 2.6.0.4189~dfsg-1
* New upstream release.
* Bump Standards.
* Refresh patches.
* Add license information about files under ./Debugger/

Show diffs side-by-side

added added

removed removed

Lines of Context:
127
127
                } else if (start <= startRange) {
128
128
                        // Trim end
129
129
                        end = startRange;
130
 
                } else { // 
 
130
                } else { //
131
131
                        PLATFORM_ASSERT(end >= endRange);
132
132
                        // Trim start
133
133
                        start = endRange;
192
192
        }
193
193
}
194
194
 
 
195
SelectionSegment Selection::LimitsForRectangularElseMain() const {
 
196
        if (IsRectangular()) {
 
197
                return Limits();
 
198
        } else {
 
199
                return SelectionSegment(ranges[mainRange].caret, ranges[mainRange].anchor);
 
200
        }
 
201
}
 
202
 
195
203
size_t Selection::Count() const {
196
204
        return ranges.size();
197
205
}
259
267
        for (size_t i=0; i<ranges.size();) {
260
268
                if ((i != mainRange) && (ranges[i].Trim(range))) {
261
269
                        // Trimmed to empty so remove
262
 
                        for (size_t j=i;j<ranges.size()-1;j++) {
 
270
                        for (size_t j=i; j<ranges.size()-1; j++) {
263
271
                                ranges[j] = ranges[j+1];
264
272
                                if (j == mainRange-1)
265
273
                                        mainRange--;