Merge branch 'numtabs-i586-pr' of https://github.com/Blarse/kitty

This commit is contained in:
Kovid Goyal 2026-03-19 14:35:57 +05:30
commit 7c8e797985
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -582,7 +582,7 @@ pyreorder_tabs(PyObject *self UNUSED, PyObject *args) {
if (PyTuple_GET_SIZE(args) < 2) Py_RETURN_NONE;
id_type os_window_id = PyLong_AsUnsignedLongLong(PyTuple_GET_ITEM(args, 0));
WITH_OS_WINDOW(os_window_id)
if (PyTuple_GET_SIZE(args) != os_window->num_tabs + 1) { PyErr_SetString(PyExc_ValueError, "number of tabs not correct"); return NULL; }
if (PyTuple_GET_SIZE(args) != (Py_ssize_t)(os_window->num_tabs + 1)) { PyErr_SetString(PyExc_ValueError, "number of tabs not correct"); return NULL; }
if (!os_window->num_tabs) Py_RETURN_NONE;
RAII_ALLOC(Tab, tabs, calloc(os_window->capacity, sizeof(Tab)));
RAII_ALLOC(char, used, calloc(os_window->num_tabs, sizeof(char)));