Changeset View
Changeset View
Standalone View
Standalone View
src/Filter.cpp
Show First 20 Lines • Show All 218 Lines • ▼ Show 20 Line(s) | 216 | for (int i = 0; i < _linePositions->count(); i++) { | |||
---|---|---|---|---|---|
219 | if (i == _linePositions->count() - 1) { | 219 | if (i == _linePositions->count() - 1) { | ||
220 | nextLine = _buffer->length() + 1; | 220 | nextLine = _buffer->length() + 1; | ||
221 | } else { | 221 | } else { | ||
222 | nextLine = _linePositions->value(i + 1); | 222 | nextLine = _linePositions->value(i + 1); | ||
223 | } | 223 | } | ||
224 | 224 | | |||
225 | if (_linePositions->value(i) <= position && position < nextLine) { | 225 | if (_linePositions->value(i) <= position && position < nextLine) { | ||
226 | startLine = i; | 226 | startLine = i; | ||
227 | startColumn = string_width(buffer()->mid(_linePositions->value(i), | 227 | startColumn = Character::stringWidth(buffer()->mid(_linePositions->value(i), | ||
228 | position - _linePositions->value(i))); | 228 | position - _linePositions->value(i))); | ||
229 | return; | 229 | return; | ||
230 | } | 230 | } | ||
231 | } | 231 | } | ||
232 | } | 232 | } | ||
233 | 233 | | |||
234 | const QString *Filter::buffer() | 234 | const QString *Filter::buffer() | ||
235 | { | 235 | { | ||
▲ Show 20 Lines • Show All 407 Lines • Show Last 20 Lines |