diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2013-05-30 14:17:19 +0200 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2013-05-30 14:23:25 +0200 |
| commit | 28e127a48ad1c1fff4e34a68be887a56a888d309 (patch) | |
| tree | 5054b99bbbe8b092931342082b09a3a6dbc62586 /src/buffer.hh | |
| parent | 07c837931333b9ea9e227fb5eaf5f60111cb2545 (diff) | |
remove avoid_eol parameter from Buffer::{iterator_at,clamp}
Diffstat (limited to 'src/buffer.hh')
| -rw-r--r-- | src/buffer.hh | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/buffer.hh b/src/buffer.hh index 8f3121e5..0f8a9602 100644 --- a/src/buffer.hh +++ b/src/buffer.hh @@ -119,12 +119,10 @@ public: bool undo(); bool redo(); - String string(const BufferCoord& begin, - const BufferCoord& end) const; + String string(const BufferCoord& begin, const BufferCoord& end) const; char at(const BufferCoord& c) const; ByteCount offset(const BufferCoord& c) const; - ByteCount distance(const BufferCoord& begin, - const BufferCoord& end) const; + ByteCount distance(const BufferCoord& begin, const BufferCoord& end) const; BufferCoord advance(BufferCoord coord, ByteCount count) const; BufferCoord next(BufferCoord coord) const; BufferCoord prev(BufferCoord coord) const; @@ -139,15 +137,11 @@ public: const String& line_content(LineCount line) const { return m_lines[line].content; } - // returns an iterator at given coordinates. line_and_column is - // clamped according to avoid_eol. - BufferIterator iterator_at(const BufferCoord& line_and_column, - bool avoid_eol = false) const; + // returns an iterator at given coordinates. clamp line_and_column + BufferIterator iterator_at(const BufferCoord& coord) const; // returns nearest valid coordinates from given ones - // if avoid_eol, clamp to character before eol if line is not empty - BufferCoord clamp(const BufferCoord& line_and_column, - bool avoid_eol = false) const; + BufferCoord clamp(BufferCoord coord) const; // returns an iterator pointing to the first character of the line // iterator is on |
