Add --nomru switch

Use this switch from the command line to skip adding file to MRU list
(Most Recently Used files).  This may be useful when setting e.g.
$EDITOR to avoid temporary files from being added to the MRU.
This commit is contained in:
Bjorn Winckler
2011-01-20 21:34:27 +01:00
parent 506b335894
commit dfa2561d7d
+9 -1
View File
@@ -1783,6 +1783,9 @@ command_line_scan(parmp)
int c;
char_u *p = NULL;
long n;
#ifdef FEAT_GUI_MACVIM
int nomru = FALSE;
#endif
--argc;
++argv;
@@ -1915,6 +1918,10 @@ command_line_scan(parmp)
{
/* already processed, skip */
}
#endif
#ifdef FEAT_GUI_MACVIM
else if (STRNICMP(argv[0] + argv_idx, "nomru", 5) == 0)
nomru = TRUE;
#endif
else
{
@@ -2445,7 +2452,8 @@ scripterror:
#ifdef FEAT_GUI_MACVIM
/* Add files opened from command line to the MRU (most recently
* used) files. */
gui_macvim_add_to_mru(p);
if (!nomru)
gui_macvim_add_to_mru(p);
#endif
#if defined(FEAT_MBYTE) && defined(WIN32)