summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-03-23 16:22:27 -0400
committerpommicket <pommicket@gmail.com>2023-03-23 16:22:27 -0400
commitd8cffa94dc38ffa1e9af64a9950df7e9acd4bde9 (patch)
tree938b7af85b86c47822c9d9a81f89d1235b5521d3
parentaf61b9be6a746421a0417d282134491213f2c03f (diff)
separate :increase-number in undo history
-rw-r--r--buffer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/buffer.c b/buffer.c
index eaf2d4b..5090306 100644
--- a/buffer.c
+++ b/buffer.c
@@ -1983,7 +1983,9 @@ bool buffer_change_number_at_pos(TextBuffer *buffer, BufferPos *ppos, i64 by) {
}
void buffer_change_number_at_cursor(TextBuffer *buffer, i64 by) {
+ buffer_start_edit_chain(buffer);
buffer_change_number_at_pos(buffer, &buffer->cursor_pos, by);
+ buffer_end_edit_chain(buffer);
}
// decrease the number of lines in the buffer.