comparison src/if_tcl.c @ 26441:65ab0b035dd8 v8.2.3751

patch 8.2.3751: cannot assign a lambda to an option that takes a function Commit: https://github.com/vim/vim/commit/6409553b6e3b4de4e1d72b8ee5445595214581ff Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Mon Dec 6 11:03:55 2021 +0000 patch 8.2.3751: cannot assign a lambda to an option that takes a function Problem: Cannot assign a lambda to an option that takes a function. Solution: Automatically convert the lambda to a string. (Yegappan Lakshmanan, closes #9286)
author Bram Moolenaar <Bram@vim.org>
date Mon, 06 Dec 2021 12:15:04 +0100
parents 9a1b96ae26d1
children 06a137af96f8
comparison
equal deleted inserted replaced
26440:f6f5f604c17c 26441:65ab0b035dd8
1306 return TCL_ERROR; 1306 return TCL_ERROR;
1307 } 1307 }
1308 1308
1309 option = (char_u *)Tcl_GetStringFromObj(objv[objn], NULL); 1309 option = (char_u *)Tcl_GetStringFromObj(objv[objn], NULL);
1310 ++objn; 1310 ++objn;
1311 gov = get_option_value(option, &lval, &sval, 0); 1311 gov = get_option_value(option, &lval, &sval, NULL, 0);
1312 err = TCL_OK; 1312 err = TCL_OK;
1313 switch (gov) 1313 switch (gov)
1314 { 1314 {
1315 case gov_string: 1315 case gov_string:
1316 Tcl_SetResult(interp, (char *)sval, TCL_VOLATILE); 1316 Tcl_SetResult(interp, (char *)sval, TCL_VOLATILE);