summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/main.c b/src/main.c
index ca8de176e..3209183ba 100644
--- a/src/main.c
+++ b/src/main.c
@@ -416,13 +416,8 @@ main
TIME_MSG("expanding arguments");
#ifdef FEAT_DIFF
- if (params.diff_mode)
- {
- if (params.window_count == -1)
- params.window_count = 0; /* open up to 3 windows */
- if (params.window_layout == 0)
- params.window_layout = WIN_VER; /* use vertical split */
- }
+ if (params.diff_mode && params.window_count == -1)
+ params.window_count = 0; /* open up to 3 windows */
#endif
/* Don't redraw until much later. */
@@ -556,6 +551,17 @@ main
}
#endif
+#ifdef FEAT_DIFF
+ /* Decide about window layout for diff mode after reading vimrc. */
+ if (params.diff_mode && params.window_layout == 0)
+ {
+ if (diffopt_horizontal())
+ params.window_layout = WIN_HOR; /* use horizontal split */
+ else
+ params.window_layout = WIN_VER; /* use vertical split */
+ }
+#endif
+
/*
* Recovery mode without a file name: List swap files.
* This uses the 'dir' option, therefore it must be after the
@@ -1357,7 +1363,7 @@ parse_command_name(parmp)
disallow_gui = TRUE;
/* TODO: On MacOS X default to gui if argv[0] ends in:
- * /vim.app/Contents/MacOS/Vim */
+ * /Vim.app/Contents/MacOS/Vim */
#endif
#ifdef FEAT_EVAL