aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
Diffstat (limited to 'editors')
-rw-r--r--editors/vi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/editors/vi.c b/editors/vi.c
index 6faaef36e..97efe0cfb 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -414,7 +414,7 @@ static int init_text_buffer(char *fn)
414 if (text_size < 10240) 414 if (text_size < 10240)
415 text_size = 10240; // have a minimum size for new files 415 text_size = 10240; // have a minimum size for new files
416 screenbegin = dot = end = text = xzalloc(text_size); 416 screenbegin = dot = end = text = xzalloc(text_size);
417 417
418 if (fn != current_filename) { 418 if (fn != current_filename) {
419 free(current_filename); 419 free(current_filename);
420 current_filename = xstrdup(fn); 420 current_filename = xstrdup(fn);
@@ -434,7 +434,7 @@ static int init_text_buffer(char *fn)
434 memset(mark, 0, sizeof(mark)); 434 memset(mark, 0, sizeof(mark));
435#endif 435#endif
436 return rc; 436 return rc;
437} 437}
438 438
439static void edit_file(char * fn) 439static void edit_file(char * fn)
440{ 440{
@@ -2210,7 +2210,7 @@ static char readit(void) // read (maybe cursor) key from stdin
2210 if (errno == EINTR) 2210 if (errno == EINTR)
2211 goto ri0; // interrupted sys call 2211 goto ri0; // interrupted sys call
2212 if (errno == EBADF || errno == EFAULT || errno == EINVAL 2212 if (errno == EBADF || errno == EFAULT || errno == EINVAL
2213 || errno == EIO) 2213 || errno == EIO)
2214 editing = 0; 2214 editing = 0;
2215 errno = 0; 2215 errno = 0;
2216 } 2216 }
@@ -2426,7 +2426,7 @@ static int file_insert(const char * fn, char *p
2426 * so we check fileperms too */ 2426 * so we check fileperms too */
2427 !(statbuf.st_mode & (S_IWUSR | S_IWGRP | S_IWOTH)))) 2427 !(statbuf.st_mode & (S_IWUSR | S_IWGRP | S_IWOTH))))
2428 { 2428 {
2429 SET_READONLY_FILE(readonly_mode); 2429 SET_READONLY_FILE(readonly_mode);
2430 } 2430 }
2431 return cnt; 2431 return cnt;
2432} 2432}