diff options
author | Alison Winters <alisonatwork@outlook.com> | 2021-04-04 08:30:16 -0700 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2021-04-13 19:30:16 +0200 |
commit | 7b5cbfd6d624e19ac296089b3d675b20bda429a4 (patch) | |
tree | 550c622a33b4ad72cce939bf5c0c6720d6bdd601 | |
parent | 27c1bc8dfb82f1ccab6bd9b4ce4f54e1fbf7bc3d (diff) |
vi: allow writing to another file if this one is readonly
Version 2. Same change but rebased after Ron's improvements. Fixes bug
where if you open a read only file, you can't save it as a different
filename.
function old new delta
colon 3160 3162 +2
Signed-off-by: Alison Winters <alisonatwork@outlook.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | editors/vi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editors/vi.c b/editors/vi.c index fb46dc381..31b5d3e8a 100644 --- a/editors/vi.c +++ b/editors/vi.c @@ -2938,7 +2938,7 @@ static void colon(char *buf) fn = args; } # if ENABLE_FEATURE_VI_READONLY - if (readonly_mode && !useforce) { + else if (readonly_mode && !useforce) { status_line_bold("'%s' is read only", fn); goto ret; } |