mirror of
https://github.com/sheumann/hush.git
synced 2024-12-22 14:30:31 +00:00
fix behavior of ZZ, with respect to readonly mode(s). original
patch and report from Alexander Griesser.
This commit is contained in:
parent
6850017a2f
commit
f0305b7f75
@ -3617,12 +3617,13 @@ key_cmd_mode:
|
||||
indicate_error(c);
|
||||
break;
|
||||
}
|
||||
if (file_modified
|
||||
if (file_modified) {
|
||||
#ifdef CONFIG_FEATURE_VI_READONLY
|
||||
&& ! vi_readonly
|
||||
&& ! readonly
|
||||
if (vi_readonly || readonly) {
|
||||
psbs("\"%s\" File is read only", cfn);
|
||||
break;
|
||||
}
|
||||
#endif /* CONFIG_FEATURE_VI_READONLY */
|
||||
) {
|
||||
cnt = file_write(cfn, text, end - 1);
|
||||
if (cnt < 0) {
|
||||
if (cnt == -1)
|
||||
|
Loading…
Reference in New Issue
Block a user