summaryrefslogtreecommitdiff
path: root/editors/vi.c
diff options
context:
space:
mode:
Diffstat (limited to 'editors/vi.c')
-rw-r--r--editors/vi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/editors/vi.c b/editors/vi.c
index 7173415..3d6182b 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -2530,7 +2530,7 @@ static int file_insert(const char *fn, char *p, int update_ro_status)
p = text_hole_delete(p, p + size - 1); // un-do buffer insert
} else if (cnt < size) {
// There was a partial read, shrink unused space text[]
- p = text_hole_delete(p + cnt, p + (size - cnt) - 1); // un-do buffer insert
+ p = text_hole_delete(p + cnt, p + size - 1); // un-do buffer insert
status_line_bold("can't read '%s'", fn);
}
if (cnt >= size)