comparison src/getchar.c @ 12716:351cf7c67bbe v8.0.1236

patch 8.0.1236: Mac features are confusing commit https://github.com/vim/vim/commit/d057301b1f28736f094affa17b190244ad56e8d9 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Oct 28 21:11:06 2017 +0200 patch 8.0.1236: Mac features are confusing Problem: Mac features are confusing. Solution: Make feature names more consistent, add "osxdarwin". Rename feature flags, cleanup Mac code. (Kazunobu Kuriyama, closes #2178)
author Christian Brabandt <cb@256bit.org>
date Sat, 28 Oct 2017 21:15:35 +0200
parents 972ea22c946f
children ebb4f6c93598
comparison
equal deleted inserted replaced
12715:279ec0abb4ac 12716:351cf7c67bbe
1891 char_avail(void) 1891 char_avail(void)
1892 { 1892 {
1893 int retval; 1893 int retval;
1894 1894
1895 #ifdef FEAT_EVAL 1895 #ifdef FEAT_EVAL
1896 /* When test_disable_char_avail(1) was called pretend there is no 1896 /* When test_override("char_avail", 1) was called pretend there is no
1897 * typeahead. */ 1897 * typeahead. */
1898 if (disable_char_avail_for_testing) 1898 if (disable_char_avail_for_testing)
1899 return FALSE; 1899 return FALSE;
1900 #endif 1900 #endif
1901 ++no_mapping; 1901 ++no_mapping;
5255 5255
5256 return NULL; 5256 return NULL;
5257 } 5257 }
5258 #endif 5258 #endif
5259 5259
5260 #if defined(MSWIN) || defined(MACOS) 5260 #if defined(MSWIN) || defined(MACOS_X)
5261 5261
5262 #define VIS_SEL (VISUAL+SELECTMODE) /* abbreviation */ 5262 #define VIS_SEL (VISUAL+SELECTMODE) /* abbreviation */
5263 5263
5264 /* 5264 /*
5265 * Default mappings for some often used keys. 5265 * Default mappings for some often used keys.
5306 {(char_u *)"\316\330 d", VIS_SEL}, /* CTRL-Del is d */ 5306 {(char_u *)"\316\330 d", VIS_SEL}, /* CTRL-Del is d */
5307 # endif 5307 # endif
5308 # endif 5308 # endif
5309 #endif 5309 #endif
5310 5310
5311 #if defined(MACOS) 5311 #if defined(MACOS_X)
5312 /* Use the Standard MacOS binding. */ 5312 /* Use the Standard MacOS binding. */
5313 /* paste, copy and cut */ 5313 /* paste, copy and cut */
5314 {(char_u *)"<D-v> \"*P", NORMAL}, 5314 {(char_u *)"<D-v> \"*P", NORMAL},
5315 {(char_u *)"<D-v> \"-d\"*P", VIS_SEL}, 5315 {(char_u *)"<D-v> \"-d\"*P", VIS_SEL},
5316 {(char_u *)"<D-v> <C-R>*", INSERT+CMDLINE}, 5316 {(char_u *)"<D-v> <C-R>*", INSERT+CMDLINE},
5327 * Set up default mappings. 5327 * Set up default mappings.
5328 */ 5328 */
5329 void 5329 void
5330 init_mappings(void) 5330 init_mappings(void)
5331 { 5331 {
5332 #if defined(MSWIN) ||defined(MACOS) 5332 #if defined(MSWIN) || defined(MACOS_X)
5333 int i; 5333 int i;
5334 5334
5335 for (i = 0; i < (int)(sizeof(initmappings) / sizeof(struct initmap)); ++i) 5335 for (i = 0; i < (int)(sizeof(initmappings) / sizeof(struct initmap)); ++i)
5336 add_map(initmappings[i].arg, initmappings[i].mode); 5336 add_map(initmappings[i].arg, initmappings[i].mode);
5337 #endif 5337 #endif
5338 } 5338 }
5339 5339
5340 #if defined(MSWIN) || defined(FEAT_CMDWIN) || defined(MACOS) || defined(PROTO) 5340 #if defined(MSWIN) || defined(FEAT_CMDWIN) || defined(MACOS_X) \
5341 || defined(PROTO)
5341 /* 5342 /*
5342 * Add a mapping "map" for mode "mode". 5343 * Add a mapping "map" for mode "mode".
5343 * Need to put string in allocated memory, because do_map() will modify it. 5344 * Need to put string in allocated memory, because do_map() will modify it.
5344 */ 5345 */
5345 void 5346 void