summaryrefslogtreecommitdiff
path: root/src/buffer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/buffer.cc')
-rw-r--r--src/buffer.cc18
1 files changed, 4 insertions, 14 deletions
diff --git a/src/buffer.cc b/src/buffer.cc
index f7eeee31..c2a04c2e 100644
--- a/src/buffer.cc
+++ b/src/buffer.cc
@@ -66,7 +66,7 @@ static void apply_options(OptionManager& options, const ParsedLines& parsed_line
}
Buffer::HistoryNode::HistoryNode(HistoryId parent)
- : parent{parent}, timepoint{Clock::now()}
+ : parent{parent}, committed{Clock::now()}
{}
Buffer::Buffer(String name, Flags flags, StringView data,
@@ -231,20 +231,10 @@ String Buffer::string(BufferCoord begin, BufferCoord end) const
return res;
}
-// A Modification holds a single atomic modification to Buffer
-struct Buffer::Modification
+Buffer::Modification Buffer::Modification::inverse() const
{
- enum Type { Insert, Erase };
-
- Type type;
- BufferCoord coord;
- StringDataPtr content;
-
- Modification inverse() const
- {
- return {type == Insert ? Erase : Insert, coord, content};
- }
-};
+ return {type == Insert ? Erase : Insert, coord, content};
+}
void Buffer::reload(StringView data, timespec fs_timestamp)
{