diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2013-06-06 19:39:53 +0200 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2013-06-06 19:44:08 +0200 |
| commit | 2a74b0e9e23e927121908ef534393ffd1b80e8ca (patch) | |
| tree | 5a7f99c72ff80ed959eb4264f58aaf451d39f7f0 /src/selection.hh | |
| parent | cf454ef904a93185c3e5318bc7b5c1d3d08fea39 (diff) | |
Buffer: insert and erase go back to taking iterators, and return iterators
Diffstat (limited to 'src/selection.hh')
| -rw-r--r-- | src/selection.hh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/selection.hh b/src/selection.hh index c7e5e2c3..fb5f20dd 100644 --- a/src/selection.hh +++ b/src/selection.hh @@ -45,9 +45,10 @@ inline String content(const Buffer& buffer, const Range& range) return buffer.string(range.min(), buffer.char_next(range.max())); } -inline void erase(Buffer& buffer, const Range& range) +inline BufferIterator erase(Buffer& buffer, const Range& range) { - return buffer.erase(range.min(), buffer.char_next(range.max())); + return buffer.erase(buffer.iterator_at(range.min()), + utf8::next(buffer.iterator_at(range.max()))); } using CaptureList = std::vector<String>; |
