add Buffer::Iterator::{prev,next}()
This commit is contained in:
parent
6108d09e8d
commit
66aa9c5235
@ -201,3 +201,17 @@ void Buffer::Iterator::warp_to_offset(size_t offset)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Buffer::Iterator Buffer::Iterator::prev()
|
||||||
|
{
|
||||||
|
Iterator i = *this;
|
||||||
|
i.go_back();
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
|
Buffer::Iterator Buffer::Iterator::next()
|
||||||
|
{
|
||||||
|
Iterator i = *this;
|
||||||
|
i.go_forward();
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
@ -41,6 +41,8 @@ public:
|
|||||||
bool go_right_in_line(bool allow_eol);
|
bool go_right_in_line(bool allow_eol);
|
||||||
bool go_previous_line();
|
bool go_previous_line();
|
||||||
bool go_next_line();
|
bool go_next_line();
|
||||||
|
Iterator prev();
|
||||||
|
Iterator next();
|
||||||
void warp(ssize_t offset_offset, ssize_t line_offset)
|
void warp(ssize_t offset_offset, ssize_t line_offset)
|
||||||
{
|
{
|
||||||
m_offset += offset_offset;
|
m_offset += offset_offset;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user