mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
updated for version 7.3.924
Problem: Python interface can't easily access options. Solution: Add vim.options, vim.window.options and vim.buffer.options. (ZyX)
This commit is contained in:
@@ -1341,6 +1341,7 @@ PythonMod_Init(void)
|
||||
PyType_Ready(&BufListType);
|
||||
PyType_Ready(&WinListType);
|
||||
PyType_Ready(&CurrentType);
|
||||
PyType_Ready(&OptionsType);
|
||||
|
||||
/* Set sys.argv[] to avoid a crash in warn(). */
|
||||
PySys_SetArgv(1, argv);
|
||||
@@ -1360,6 +1361,9 @@ PythonMod_Init(void)
|
||||
tmp = DictionaryNew(&vimvardict);
|
||||
PyDict_SetItemString(dict, "vvars", tmp);
|
||||
Py_DECREF(tmp);
|
||||
tmp = OptionsNew(SREQ_GLOBAL, NULL, dummy_check, NULL);
|
||||
PyDict_SetItemString(dict, "options", tmp);
|
||||
Py_DECREF(tmp);
|
||||
PyDict_SetItemString(dict, "VAR_LOCKED", PyInt_FromLong(VAR_LOCKED));
|
||||
PyDict_SetItemString(dict, "VAR_FIXED", PyInt_FromLong(VAR_FIXED));
|
||||
PyDict_SetItemString(dict, "VAR_SCOPE", PyInt_FromLong(VAR_SCOPE));
|
||||
|
Reference in New Issue
Block a user