aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/hardcopy.c
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2016-05-01 20:35:51 +0300
committerZyX <kp-pav@yandex.ru>2016-05-01 20:35:51 +0300
commitcf4e1fb0f4962319eee292248d9c1f73be3a8d0c (patch)
tree60b1d2aad6205c74b7c2611fbbed45759a302f4f /src/nvim/hardcopy.c
parenta1f985f60a228604970a70872b7ea1fb5299eba3 (diff)
downloadrneovim-cf4e1fb0f4962319eee292248d9c1f73be3a8d0c.tar.gz
rneovim-cf4e1fb0f4962319eee292248d9c1f73be3a8d0c.tar.bz2
rneovim-cf4e1fb0f4962319eee292248d9c1f73be3a8d0c.zip
*: Fix new linter errors
Originally there were 128 new errors, so I thought this is a good idea to fix all of them. Of course, this commit also fixes many suppressed errors.
Diffstat (limited to 'src/nvim/hardcopy.c')
-rw-r--r--src/nvim/hardcopy.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/nvim/hardcopy.c b/src/nvim/hardcopy.c
index 6ce8954fef..916d27a964 100644
--- a/src/nvim/hardcopy.c
+++ b/src/nvim/hardcopy.c
@@ -2190,18 +2190,19 @@ int mch_print_init(prt_settings_T *psettings, char_u *jobname, int forceit)
mbfont_opts[OPT_MBFONT_BOLDOBLIQUE].strlen);
}
- /* Check if need to use Courier for ASCII code range, and if so pick up
- * the encoding to use */
- prt_use_courier = mbfont_opts[OPT_MBFONT_USECOURIER].present &&
- (TOLOWER_ASC(mbfont_opts[OPT_MBFONT_USECOURIER].string[0])
- == 'y');
+ // Check if need to use Courier for ASCII code range, and if so pick up
+ // the encoding to use
+ prt_use_courier = (
+ mbfont_opts[OPT_MBFONT_USECOURIER].present
+ && (TOLOWER_ASC(mbfont_opts[OPT_MBFONT_USECOURIER].string[0]) == 'y'));
if (prt_use_courier) {
- /* Use national ASCII variant unless ASCII wanted */
- if (mbfont_opts[OPT_MBFONT_ASCII].present &&
- (TOLOWER_ASC(mbfont_opts[OPT_MBFONT_ASCII].string[0]) == 'y'))
+ // Use national ASCII variant unless ASCII wanted
+ if (mbfont_opts[OPT_MBFONT_ASCII].present
+ && (TOLOWER_ASC(mbfont_opts[OPT_MBFONT_ASCII].string[0]) == 'y')) {
prt_ascii_encoding = "ascii";
- else
+ } else {
prt_ascii_encoding = prt_ps_mbfonts[cmap].ascii_enc;
+ }
}
prt_ps_font = &prt_ps_mb_font;
@@ -3029,10 +3030,10 @@ int mch_print_text_out(char_u *p, size_t len)
prt_text_run += char_width;
prt_pos_x += char_width;
- /* The downside of fp - use relative error on right margin check */
+ // The downside of fp - use relative error on right margin check
next_pos = prt_pos_x + prt_char_width;
- need_break = (next_pos > prt_right_margin) &&
- ((next_pos - prt_right_margin) > (prt_right_margin*1e-5));
+ need_break = ((next_pos > prt_right_margin)
+ && ((next_pos - prt_right_margin) > (prt_right_margin * 1e-5)));
if (need_break)
prt_flush_buffer();