summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-12-21 14:11:28 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2020-12-21 14:11:28 -0500
commit12cce30fad0a685d333cc23c7c71fded4b6cf329 (patch)
tree79ca41ac4e53596079db5e1637730da405b8942c /main.c
parent41c33e59e85909989009e96370403abf319008ad (diff)
undo working, just need to chain events (rather than undoing one character insertion/deletion at a time)
Diffstat (limited to 'main.c')
-rw-r--r--main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.c b/main.c
index 31dd849..0a7b420 100644
--- a/main.c
+++ b/main.c
@@ -146,9 +146,9 @@ int main(void) {
case SDLK_z:
if (ctrl) {
if (shift) {
- buffer_undo(&text_buffer, 1);
- } else {
buffer_redo(&text_buffer, 1);
+ } else {
+ buffer_undo(&text_buffer, 1);
}
}
break;