---
 editors/vi.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/editors/vi.c b/editors/vi.c
index 0ea547a..ee15d57 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -2119,15 +2119,11 @@ static int file_write(char *fn, char *first, char *last)
 		status_line_bold("No current filename");
 		return -2;
 	}
-	// By popular request we do not open file with O_TRUNC,
-	// but instead ftruncate() it _after_ successful write.
-	// Might reduce amount of data lost on power fail etc.
-	fd = open(fn, (O_WRONLY | O_CREAT), 0666);
+	fd = open(fn, (O_WRONLY | O_CREAT | O_TRUNC), 0666);
 	if (fd < 0)
 		return -1;
 	cnt = last - first + 1;
 	charcnt = full_write(fd, first, cnt);
-	ftruncate(fd, charcnt);
 	if (charcnt == cnt) {
 		// good write
 		//modified_count = FALSE;
-- 
2.7.4

