comparison src/os_macosx.m @ 15607:2dcaa860e3fc v8.1.0811

patch 8.1.0811: too many #ifdefs commit https://github.com/vim/vim/commit/30276f2beb248557c6b33cd5418bca8b7084b0a5 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jan 24 17:59:39 2019 +0100 patch 8.1.0811: too many #ifdefs Problem: Too many #ifdefs. Solution: Graduate FEAT_MBYTE, the final chapter.
author Bram Moolenaar <Bram@vim.org>
date Thu, 24 Jan 2019 18:00:07 +0100
parents 73162bc0b21f
children d0438b4b0acf
comparison
equal deleted inserted replaced
15606:50e09796a00a 15607:2dcaa860e3fc
128 motion_type = MAUTO; 128 motion_type = MAUTO;
129 129
130 char_u *str = (char_u*)[string UTF8String]; 130 char_u *str = (char_u*)[string UTF8String];
131 int len = [string lengthOfBytesUsingEncoding:NSUTF8StringEncoding]; 131 int len = [string lengthOfBytesUsingEncoding:NSUTF8StringEncoding];
132 132
133 #ifdef FEAT_MBYTE
134 if (input_conv.vc_type != CONV_NONE) 133 if (input_conv.vc_type != CONV_NONE)
135 str = string_convert(&input_conv, str, &len); 134 str = string_convert(&input_conv, str, &len);
136 #endif
137 135
138 if (str) 136 if (str)
139 clip_yank_selection(motion_type, str, len, cbd); 137 clip_yank_selection(motion_type, str, len, cbd);
140 138
141 #ifdef FEAT_MBYTE
142 if (input_conv.vc_type != CONV_NONE) 139 if (input_conv.vc_type != CONV_NONE)
143 vim_free(str); 140 vim_free(str);
144 #endif
145 141
146 releasepool: 142 releasepool:
147 [pool release]; 143 [pool release];
148 } 144 }
149 145
167 if (motion_type < 0) 163 if (motion_type < 0)
168 goto releasepool; 164 goto releasepool;
169 165
170 /* TODO: Avoid overflow. */ 166 /* TODO: Avoid overflow. */
171 int len = (int)llen; 167 int len = (int)llen;
172 #ifdef FEAT_MBYTE
173 if (output_conv.vc_type != CONV_NONE) 168 if (output_conv.vc_type != CONV_NONE)
174 { 169 {
175 char_u *conv_str = string_convert(&output_conv, str, &len); 170 char_u *conv_str = string_convert(&output_conv, str, &len);
176 if (conv_str) 171 if (conv_str)
177 { 172 {
178 vim_free(str); 173 vim_free(str);
179 str = conv_str; 174 str = conv_str;
180 } 175 }
181 } 176 }
182 #endif
183 177
184 if (len > 0) 178 if (len > 0)
185 { 179 {
186 NSString *string = [[NSString alloc] 180 NSString *string = [[NSString alloc]
187 initWithBytes:str length:len encoding:NSUTF8StringEncoding]; 181 initWithBytes:str length:len encoding:NSUTF8StringEncoding];