Commit eec40df2 authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

in do_insertfile(), remove redundant code: we only mark the file as

modified if we're not in multibuffer mode, in which case view mode
should never be on


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3787 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
parent c346701d
Showing with 2 additions and 6 deletions
+2 -6
...@@ -78,8 +78,6 @@ CVS code - ...@@ -78,8 +78,6 @@ CVS code -
path. (DLR) path. (DLR)
- files.c: - files.c:
do_insertfile() do_insertfile()
- If we're in view mode, as we can be if multibuffer mode is on,
don't mark the file as modified. (DLR)
- If we execute a command in a new buffer, move back to the - If we execute a command in a new buffer, move back to the
beginning of the first line of the buffer afterwards, for beginning of the first line of the buffer afterwards, for
consistency. (DLR) consistency. (DLR)
......
...@@ -878,10 +878,8 @@ void do_insertfile( ...@@ -878,10 +878,8 @@ void do_insertfile(
/* Restore the old place we want. */ /* Restore the old place we want. */
openfile->placewewant = pww_save; openfile->placewewant = pww_save;
/* Mark the file as modified, unless we're here in view /* Mark the file as modified. */
* mode, which we can be if multibuffer mode is on. */ set_modified();
if (!ISSET(VIEW_MODE))
set_modified();
/* Update the screen. */ /* Update the screen. */
edit_refresh(); edit_refresh();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment