diff options
author | Anton Ovchinnikov <revolver112@gmail.com> | 2015-03-14 23:20:54 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2015-03-16 11:01:08 -0400 |
commit | a62a2b6250daa1f4043461d0e2358531ad2ee40d (patch) | |
tree | cda6b31d999f603a3192342ca5901111fb16959d /src | |
parent | 9927e999486435ee0d0e4c82e9d263b774a1728e (diff) | |
download | rneovim-a62a2b6250daa1f4043461d0e2358531ad2ee40d.tar.gz rneovim-a62a2b6250daa1f4043461d0e2358531ad2ee40d.tar.bz2 rneovim-a62a2b6250daa1f4043461d0e2358531ad2ee40d.zip |
Merge consecutive identical 'if' statements
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/farsi.c | 9 | ||||
-rw-r--r-- | src/nvim/fileio.c | 14 |
2 files changed, 7 insertions, 16 deletions
diff --git a/src/nvim/farsi.c b/src/nvim/farsi.c index db167825ce..2ca581ebd3 100644 --- a/src/nvim/farsi.c +++ b/src/nvim/farsi.c @@ -1561,9 +1561,6 @@ int fkmap(int c) if (!curwin->w_cursor.col) { return ALEF_U_H; } - } - - if (!p_ri) { dec_cursor(); } @@ -1595,9 +1592,6 @@ int fkmap(int c) if (!curwin->w_cursor.col) { return ALEF; } - } - - if (!p_ri) { dec_cursor(); } @@ -1673,9 +1667,6 @@ int fkmap(int c) if (!curwin->w_cursor.col) { return TEE; } - } - - if (!p_ri) { dec_cursor(); } diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index aab55bda77..9d4c990f3a 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -1729,14 +1729,14 @@ failed: } } - if (set_options) - save_file_ff(curbuf); /* remember the current file format */ - - /* If editing a new file: set 'fenc' for the current buffer. - * Also for ":read ++edit file". */ - if (set_options) + if (set_options) { + // Remember the current file format. + save_file_ff(curbuf); + // If editing a new file: set 'fenc' for the current buffer. + // Also for ":read ++edit file". set_string_option_direct((char_u *)"fenc", -1, fenc, - OPT_FREE|OPT_LOCAL, 0); + OPT_FREE | OPT_LOCAL, 0); + } if (fenc_alloced) free(fenc); # ifdef USE_ICONV |