summaryrefslogtreecommitdiff
path: root/src/buffer.hh
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2016-03-16 13:48:11 +0000
committerMaxime Coste <frrrwww@gmail.com>2016-03-16 13:48:11 +0000
commitde1433d30ade30c6768cefb085ff69ef7387fa2f (patch)
treece7161d346db680e96cb80ed22928810e45655c4 /src/buffer.hh
parentc5b24e2a8a783fda939c6576158e0d9d591d632b (diff)
Avoid the spurious newline insertion when replacing at end of buffer
Add a Buffer::replace method to handle the replacements properly Fixes #633
Diffstat (limited to 'src/buffer.hh')
-rw-r--r--src/buffer.hh1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/buffer.hh b/src/buffer.hh
index a7ab127c..6b99ab1d 100644
--- a/src/buffer.hh
+++ b/src/buffer.hh
@@ -123,6 +123,7 @@ public:
BufferIterator insert(const BufferIterator& pos, StringView content);
BufferIterator erase(BufferIterator begin, BufferIterator end);
+ BufferIterator replace(const BufferIterator& begin, const BufferIterator& end, StringView content);
size_t timestamp() const;
timespec fs_timestamp() const;