diff options
Diffstat (limited to 'editors/vi.c')
-rw-r--r-- | editors/vi.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/editors/vi.c b/editors/vi.c index 075f714cf..b2d185193 100644 --- a/editors/vi.c +++ b/editors/vi.c | |||
@@ -2919,10 +2919,10 @@ static int file_insert(const char *fn, char *p, int initial) | |||
2919 | int fd, size; | 2919 | int fd, size; |
2920 | struct stat statbuf; | 2920 | struct stat statbuf; |
2921 | 2921 | ||
2922 | if (p < text || p > end) { | 2922 | if (p < text) |
2923 | status_line_bold("Trying to insert file outside of memory"); | 2923 | p = text; |
2924 | return cnt; | 2924 | if (p > end) |
2925 | } | 2925 | p = end; |
2926 | 2926 | ||
2927 | fd = open(fn, O_RDONLY); | 2927 | fd = open(fn, O_RDONLY); |
2928 | if (fd < 0) { | 2928 | if (fd < 0) { |