mirror of
https://github.com/mawww/kakoune.git
synced 2024-12-19 09:21:30 +03:00
more tolerant Buffer::string
This commit is contained in:
parent
b1f31d2e12
commit
5b4ef23b9d
@ -129,7 +129,7 @@ LineCount Buffer::line_count() const
|
||||
String Buffer::string(const BufferCoord& begin, const BufferCoord& end) const
|
||||
{
|
||||
String res;
|
||||
for (LineCount line = begin.line; line <= end.line; ++line)
|
||||
for (auto line = begin.line; line <= end.line and line < line_count(); ++line)
|
||||
{
|
||||
ByteCount start = 0;
|
||||
if (line == begin.line)
|
||||
|
Loading…
Reference in New Issue
Block a user