comparison src/evalfunc.c @ 19400:bd9069d21c5d v8.2.0258

patch 8.2.0258: modifyOtherKeys cannot be temporarily disabled Commit: https://github.com/vim/vim/commit/4132eb505c506f7a0710b03a275d1c5a247e4196 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Feb 14 16:53:00 2020 +0100 patch 8.2.0258: modifyOtherKeys cannot be temporarily disabled Problem: ModifyOtherKeys cannot be temporarily disabled. Solution: Add echoraw() with an example for modifyOtherKeys.
author Bram Moolenaar <Bram@vim.org>
date Fri, 14 Feb 2020 17:00:04 +0100
parents f0033a10b613
children fdfe44ac6a1a
comparison
equal deleted inserted replaced
19399:99feeb1a4af7 19400:bd9069d21c5d
58 #ifdef MSWIN 58 #ifdef MSWIN
59 static void f_debugbreak(typval_T *argvars, typval_T *rettv); 59 static void f_debugbreak(typval_T *argvars, typval_T *rettv);
60 #endif 60 #endif
61 static void f_deepcopy(typval_T *argvars, typval_T *rettv); 61 static void f_deepcopy(typval_T *argvars, typval_T *rettv);
62 static void f_did_filetype(typval_T *argvars, typval_T *rettv); 62 static void f_did_filetype(typval_T *argvars, typval_T *rettv);
63 static void f_echoraw(typval_T *argvars, typval_T *rettv);
63 static void f_empty(typval_T *argvars, typval_T *rettv); 64 static void f_empty(typval_T *argvars, typval_T *rettv);
64 static void f_environ(typval_T *argvars, typval_T *rettv); 65 static void f_environ(typval_T *argvars, typval_T *rettv);
65 static void f_escape(typval_T *argvars, typval_T *rettv); 66 static void f_escape(typval_T *argvars, typval_T *rettv);
66 static void f_eval(typval_T *argvars, typval_T *rettv); 67 static void f_eval(typval_T *argvars, typval_T *rettv);
67 static void f_eventhandler(typval_T *argvars, typval_T *rettv); 68 static void f_eventhandler(typval_T *argvars, typval_T *rettv);
392 {"delete", 1, 2, FEARG_1, &t_number, f_delete}, 393 {"delete", 1, 2, FEARG_1, &t_number, f_delete},
393 {"deletebufline", 2, 3, FEARG_1, &t_number, f_deletebufline}, 394 {"deletebufline", 2, 3, FEARG_1, &t_number, f_deletebufline},
394 {"did_filetype", 0, 0, 0, &t_number, f_did_filetype}, 395 {"did_filetype", 0, 0, 0, &t_number, f_did_filetype},
395 {"diff_filler", 1, 1, FEARG_1, &t_number, f_diff_filler}, 396 {"diff_filler", 1, 1, FEARG_1, &t_number, f_diff_filler},
396 {"diff_hlID", 2, 2, FEARG_1, &t_number, f_diff_hlID}, 397 {"diff_hlID", 2, 2, FEARG_1, &t_number, f_diff_hlID},
398 {"echoraw", 1, 1, FEARG_1, &t_number, f_echoraw},
397 {"empty", 1, 1, FEARG_1, &t_number, f_empty}, 399 {"empty", 1, 1, FEARG_1, &t_number, f_empty},
398 {"environ", 0, 0, 0, &t_dict_string, f_environ}, 400 {"environ", 0, 0, 0, &t_dict_string, f_environ},
399 {"escape", 2, 2, FEARG_1, &t_string, f_escape}, 401 {"escape", 2, 2, FEARG_1, &t_string, f_escape},
400 {"eval", 1, 1, FEARG_1, &t_any, f_eval}, 402 {"eval", 1, 1, FEARG_1, &t_any, f_eval},
401 {"eventhandler", 0, 0, 0, &t_number, f_eventhandler}, 403 {"eventhandler", 0, 0, 0, &t_number, f_eventhandler},
1812 { 1814 {
1813 rettv->vval.v_number = did_filetype; 1815 rettv->vval.v_number = did_filetype;
1814 } 1816 }
1815 1817
1816 /* 1818 /*
1819 * "echoraw({expr})" function
1820 */
1821 static void
1822 f_echoraw(typval_T *argvars, typval_T *rettv UNUSED)
1823 {
1824 char_u *str = tv_get_string_chk(&argvars[0]);
1825
1826 if (str != NULL && *str != NUL)
1827 {
1828 out_str(str);
1829 out_flush();
1830 }
1831 }
1832
1833 /*
1817 * "empty({expr})" function 1834 * "empty({expr})" function
1818 */ 1835 */
1819 static void 1836 static void
1820 f_empty(typval_T *argvars, typval_T *rettv) 1837 f_empty(typval_T *argvars, typval_T *rettv)
1821 { 1838 {