summaryrefslogtreecommitdiff
path: root/src/buffer.hh
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2018-03-13 14:00:57 +1100
committerMaxime Coste <mawww@kakoune.org>2018-03-13 14:00:57 +1100
commitbfaf52f8c0ff6ab5e25944484be8014e855dd410 (patch)
treecc17ddad0961def8d8c86c188371a269566edd76 /src/buffer.hh
parent1f4ad0f25e82023c5982dbbcb5a1a5aa835e1014 (diff)
Do not jump to buffer start on `g.` with no previous modifications
Diffstat (limited to 'src/buffer.hh')
-rw-r--r--src/buffer.hh5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/buffer.hh b/src/buffer.hh
index d8f18015..7ff5bab7 100644
--- a/src/buffer.hh
+++ b/src/buffer.hh
@@ -5,6 +5,7 @@
#include "coord.hh"
#include "constexpr_utils.hh"
#include "enum.hh"
+#include "optional.hh"
#include "safe_ptr.hh"
#include "scope.hh"
#include "shared_string.hh"
@@ -163,12 +164,12 @@ public:
bool is_valid(BufferCoord c) const;
bool is_end(BufferCoord c) const;
- BufferCoord last_modification_coord() const;
-
BufferIterator begin() const;
BufferIterator end() const;
LineCount line_count() const;
+ Optional<BufferCoord> last_modification_coord() const;
+
StringView operator[](LineCount line) const
{ return m_lines[line]; }