summary refs log tree commit diff
path: root/edit.c
diff options
context:
space:
mode:
Diffstat (limited to 'edit.c')
-rw-r--r--edit.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/edit.c b/edit.c
index 573e549..1f8f170 100644
--- a/edit.c
+++ b/edit.c
@@ -185,10 +185,9 @@ void edit(size_t id, enum Edit op, wchar_t ch) {
 		break; case EditTranspose: {
 			if (!pos || len < 2) break;
 			if (pos == len) pos--;
-			wchar_t t = buf[pos];
-			buf[pos] = buf[pos - 1];
-			buf[pos - 1] = t;
-			pos++;
+			wchar_t t = buf[pos - 1];
+			buf[pos - 1] = buf[pos];
+			buf[pos++] = t;
 		}
 
 		break; case EditInsert: {
1f47485a7&follow=1'>Add htagmlJune McEnroe 2021-01-12Replace causal.agency with a simple mdoc pageJune McEnroe 2021-01-11Publish "Using vi"June McEnroe 2021-01-11Enable diff.colorMovedJune McEnroe 2021-01-10Set less search case-insensitiveJune McEnroe 2021-01-10Set EXINITJune McEnroe neovim is laggy as hell in my OpenBSD VM, so I switched to vi so I could type without getting frustrated. 2021-01-09Add c -t flag to print expression typeJune McEnroe Also add missing float case. 2021-01-05Update taglineJune McEnroe