mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-26 06:39:43 +03:00
options: let view mode activate "multibuffer" to allow viewing more files
When --view is used without --ignorercfiles, the user could view other files anyway if they had 'set multibuffer' in their nanorc. So, just make this the default when --view is used, also because "multibuffer" cannot be toggled once nano is running in view mode. When the viewing of other files in view mode should not be allowed, one should now additionally use --restricted.
This commit is contained in:
parent
71de0b9e2f
commit
63f2be7a2f
@ -1258,10 +1258,6 @@ void do_insertfile_void(void)
|
|||||||
{
|
{
|
||||||
if (ISSET(RESTRICTED))
|
if (ISSET(RESTRICTED))
|
||||||
show_restricted_warning();
|
show_restricted_warning();
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
|
||||||
else if (ISSET(VIEW_MODE) && !ISSET(MULTIBUFFER))
|
|
||||||
statusbar(_("Key invalid in non-multibuffer mode"));
|
|
||||||
#endif
|
|
||||||
else
|
else
|
||||||
do_insertfile();
|
do_insertfile();
|
||||||
}
|
}
|
||||||
|
@ -2654,6 +2654,8 @@ int main(int argc, char **argv)
|
|||||||
openfile = openfile->next;
|
openfile = openfile->next;
|
||||||
if (more_than_one)
|
if (more_than_one)
|
||||||
mention_name_and_linecount();
|
mention_name_and_linecount();
|
||||||
|
if (ISSET(VIEW_MODE))
|
||||||
|
SET(MULTIBUFFER);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user