From dfa2561d7d7bceea7273127a7091c7dae9a604d1 Mon Sep 17 00:00:00 2001 From: Bjorn Winckler Date: Thu, 20 Jan 2011 21:34:27 +0100 Subject: [PATCH] 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. --- src/main.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index cdd8bc4bf8..1eeb462ed0 100644 --- a/src/main.c +++ b/src/main.c @@ -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)