chore: import official kitty sources from upstream

Bring the kovidgoyal/kitty codebase in as the base of FWS-Kitty,
vendored at upstream commit 91fb38a without its git history.
This commit is contained in:
BlackAngelTV committed 2026-11-04 11:20:47 +01:00
commit 7e7d249099
1134 files changed
+433629

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
/*
* Copyright (C) 2020 Kovid Goyal <kovid at kovidgoyal.net>
*
* Distributed under terms of the GPL3 license.
*/
#pragma once
#include "char-props.h"
typedef enum { NORMAL, IN_ESC, IN_CSI, IN_ST_TERMINATED } WCSParserState;
typedef struct {
char_type prev_ch;
int prev_width;
WCSParserState parser_state;
bool can_combine;
GraphemeSegmentationResult seg;
} WCSState;
void initialize_wcs_state(WCSState *state);
int wcswidth_step(WCSState *state, const char_type ch);
PyObject *wcswidth_std(PyObject UNUSED *self, PyObject *str);
size_t wcswidth_string(const char_type *s);