From 135059724f140ceac889c9f8136bd1bf5c41d49d Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 24 Jan 2019 15:04:48 +0100 Subject: patch 8.1.0805: too many #ifdefs Problem: Too many #ifdefs. Solution: Graduate FEAT_MBYTE, part 1. --- src/gui_photon.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'src/gui_photon.c') diff --git a/src/gui_photon.c b/src/gui_photon.c index 77d7873fe..234d25066 100644 --- a/src/gui_photon.c +++ b/src/gui_photon.c @@ -513,13 +513,8 @@ gui_ph_handle_keyboard(PtWidget_t *widget, void *data, PtCallbackInfo_t *info) if (special_keys[i].key_sym == 0) { ch = PhTo8859_1(key); - if (ch == -1 -#ifdef FEAT_MBYTE - || (enc_utf8 && ch > 127) -#endif - ) + if (ch == -1 || (enc_utf8 && ch > 127)) { -#ifdef FEAT_MBYTE len = PhKeyToMb(string, key); if (len > 0) { @@ -546,7 +541,6 @@ gui_ph_handle_keyboard(PtWidget_t *widget, void *data, PtCallbackInfo_t *info) return Pt_CONSUME; } len = 0; -#endif ch = key->key_cap; if (ch < 0xff) { @@ -1074,7 +1068,6 @@ gui_ph_pane_resize(PtWidget_t *widget, void *data, PtCallbackInfo_t *info) /****************************************************************************/ -#ifdef FEAT_MBYTE void gui_ph_encoding_changed(int new_encoding) { @@ -1100,7 +1093,6 @@ gui_ph_encoding_changed(int new_encoding) charset_translate = PxTranslateSet(charset_translate, charset); } -#endif /****************************************************************************/ /****************************************************************************/ @@ -2141,11 +2133,7 @@ gui_mch_draw_string(int row, int col, char_u *s, int len, int flags) if (flags & DRAW_UNDERL) PgSetUnderline(gui.norm_pixel, Pg_TRANSPARENT, 0); - if (charset_translate != NULL -#ifdef FEAT_MBYTE - && enc_utf8 == 0 -#endif - ) + if (charset_translate != NULL && enc_utf8 == 0) { int src_taken, dst_made; -- cgit v1.2.1