summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-08-05 22:33:12 -0400
committerpommicket <pommicket@gmail.com>2023-08-05 22:33:12 -0400
commit913a5a5dfbcf6789a1ac6b8c32fb23cdcdde995b (patch)
tree24265598ce4bf860b2e90c2cce3f57693585afd8
parent93023da1f9ed1e40d4e4317d20dbf8398017eee7 (diff)
scroll to cursor on undo/redo
-rw-r--r--buffer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/buffer.c b/buffer.c
index 64d9024..070a40e 100644
--- a/buffer.c
+++ b/buffer.c
@@ -2487,6 +2487,7 @@ void buffer_undo(TextBuffer *buffer, i64 ntimes) {
chain_next = chain;
} else break;
}
+ buffer_scroll_to_cursor(buffer);
}
void buffer_redo(TextBuffer *buffer, i64 ntimes) {
@@ -2512,6 +2513,7 @@ void buffer_redo(TextBuffer *buffer, i64 ntimes) {
chain_next = chain;
} else break;
}
+ buffer_scroll_to_cursor(buffer);
}
// if you do: