1
0
forked from aniani/vim

patch 8.1.0811: too many #ifdefs

Problem:    Too many #ifdefs.
Solution:   Graduate FEAT_MBYTE, the final chapter.
This commit is contained in:
Bram Moolenaar
2019-01-24 17:59:39 +01:00
parent 264b74fa54
commit 30276f2beb
54 changed files with 121 additions and 324 deletions

View File

@@ -130,18 +130,14 @@ clip_mch_request_selection(VimClipboard *cbd)
char_u *str = (char_u*)[string UTF8String];
int len = [string lengthOfBytesUsingEncoding:NSUTF8StringEncoding];
#ifdef FEAT_MBYTE
if (input_conv.vc_type != CONV_NONE)
str = string_convert(&input_conv, str, &len);
#endif
if (str)
clip_yank_selection(motion_type, str, len, cbd);
#ifdef FEAT_MBYTE
if (input_conv.vc_type != CONV_NONE)
vim_free(str);
#endif
releasepool:
[pool release];
@@ -169,7 +165,6 @@ clip_mch_set_selection(VimClipboard *cbd)
/* TODO: Avoid overflow. */
int len = (int)llen;
#ifdef FEAT_MBYTE
if (output_conv.vc_type != CONV_NONE)
{
char_u *conv_str = string_convert(&output_conv, str, &len);
@@ -179,7 +174,6 @@ clip_mch_set_selection(VimClipboard *cbd)
str = conv_str;
}
}
#endif
if (len > 0)
{