diff options
Diffstat (limited to 'src/nvim/hardcopy.c')
-rw-r--r-- | src/nvim/hardcopy.c | 25 |
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(); |