aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
Diffstat (limited to 'editors')
-rw-r--r--editors/vi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/editors/vi.c b/editors/vi.c
index ee3c7feb2..271529404 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -2364,7 +2364,7 @@ static void undo_push(char *src, unsigned int length, uint8_t u_type) // Add to
// Allocate a new undo object
if (u_type == UNDO_DEL || u_type == UNDO_DEL_CHAIN) {
// For UNDO_DEL objects, save deleted text
- if ((src + length) == end)
+ if ((text + length) == end)
length--;
// If this deletion empties text[], strip the newline. When the buffer becomes
// zero-length, a newline is added back, which requires this to compensate.