aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-08-13 22:19:06 +0200
committerJustin M. Keyes <justinkz@gmail.com>2019-08-13 22:22:47 +0200
commit02c52a18f5ca63ebb8b9a7ccd9c430c22c234462 (patch)
tree1982b8401985cb2e491bad72bc68ce4ba8253b51
parentcbfd18c85acdce397f948edd764ac738ab9281ad (diff)
downloadrneovim-02c52a18f5ca63ebb8b9a7ccd9c430c22c234462.tar.gz
rneovim-02c52a18f5ca63ebb8b9a7ccd9c430c22c234462.tar.bz2
rneovim-02c52a18f5ca63ebb8b9a7ccd9c430c22c234462.zip
style
-rw-r--r--src/nvim/main.c3
-rw-r--r--src/nvim/option.c39
2 files changed, 15 insertions, 27 deletions
diff --git a/src/nvim/main.c b/src/nvim/main.c
index 5aa7ed42d3..27b6a6bfc5 100644
--- a/src/nvim/main.c
+++ b/src/nvim/main.c
@@ -396,8 +396,7 @@ int main(int argc, char **argv)
mch_exit(0);
}
- // Set a few option defaults after reading vimrc files: 'title', 'icon',
- // 'shellpipe', 'shellredir'.
+ // Set some option defaults after reading vimrc files.
set_init_3();
TIME_MSG("inits 3");
diff --git a/src/nvim/option.c b/src/nvim/option.c
index 953479fdd0..699f17acc5 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -1004,9 +1004,7 @@ void set_init_2(bool headless)
(void)parse_printoptions(); // parse 'printoptions' default value
}
-/*
- * Initialize the options, part three: After reading the .vimrc
- */
+/// Initialize the options, part three: After reading the .vimrc
void set_init_3(void)
{
parse_shape_opt(SHAPE_CURSOR); // set cursor shapes from 'guicursor'
@@ -1014,33 +1012,24 @@ void set_init_3(void)
// Set 'shellpipe' and 'shellredir', depending on the 'shell' option.
// This is done after other initializations, where 'shell' might have been
// set, but only if they have not been set before.
- int idx_srr;
- int do_srr;
- int idx_sp;
- int do_sp;
-
- idx_srr = findoption("srr");
- if (idx_srr < 0) {
- do_srr = false;
- } else {
- do_srr = !(options[idx_srr].flags & P_WAS_SET);
- }
- idx_sp = findoption("sp");
- if (idx_sp < 0) {
- do_sp = false;
- } else {
- do_sp = !(options[idx_sp].flags & P_WAS_SET);
- }
+ int idx_srr = findoption("srr");
+ int do_srr = (idx_srr < 0)
+ ? false
+ : !(options[idx_srr].flags & P_WAS_SET);
+ int idx_sp = findoption("sp");
+ int do_sp = (idx_sp < 0)
+ ? false
+ : !(options[idx_sp].flags & P_WAS_SET);
size_t len = 0;
char_u *p = (char_u *)invocation_path_tail(p_sh, &len);
p = vim_strnsave(p, len);
{
- /*
- * Default for p_sp is "| tee", for p_srr is ">".
- * For known shells it is changed here to include stderr.
- */
+ //
+ // Default for p_sp is "| tee", for p_srr is ">".
+ // For known shells it is changed here to include stderr.
+ //
if ( fnamecmp(p, "csh") == 0
|| fnamecmp(p, "tcsh") == 0
) {
@@ -1082,7 +1071,7 @@ void set_init_3(void)
}
}
- set_title_defaults();
+ set_title_defaults(); // 'title', 'icon'
}
/*