summaryrefslogtreecommitdiff
path: root/src/buffer.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2011-09-22 13:58:35 +0000
committerMaxime Coste <frrrwww@gmail.com>2011-09-22 13:58:35 +0000
commit948443a0775a19c4a6664f41d02dfd4409d24681 (patch)
treea44ed3655e39b59a31751e35df1757bd7fce6c8a /src/buffer.cc
parent2efa120612b0466528e9eeacbf8b390530ede2d4 (diff)
Buffer: add line_count method
Diffstat (limited to 'src/buffer.cc')
-rw-r--r--src/buffer.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/buffer.cc b/src/buffer.cc
index 2adb1b2c..aa900ccf 100644
--- a/src/buffer.cc
+++ b/src/buffer.cc
@@ -233,6 +233,11 @@ BufferSize Buffer::length() const
return m_content.size();
}
+BufferSize Buffer::line_count() const
+{
+ return m_lines.size();
+}
+
BufferString Buffer::string(const BufferIterator& begin, const BufferIterator& end) const
{
return m_content.substr(begin.m_position, end - begin);