Add support for XTVERSION version reporting escape code
This commit is contained in:
parent
79b130ed23
commit
057084a708
@ -4,6 +4,11 @@ Changelog
|
|||||||
|kitty| is a feature-rich, cross-platform, *fast*, GPU based terminal.
|
|kitty| is a feature-rich, cross-platform, *fast*, GPU based terminal.
|
||||||
To update |kitty|, :doc:`follow the instructions <binary>`.
|
To update |kitty|, :doc:`follow the instructions <binary>`.
|
||||||
|
|
||||||
|
0.21.2 [future]
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
- Add support for the XTVERSION escape code
|
||||||
|
|
||||||
0.21.1 [2021-06-14]
|
0.21.1 [2021-06-14]
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
|
|||||||
@ -935,7 +935,14 @@ dispatch_csi(Screen *screen, PyObject DUMP_UNUSED *dump_callback) {
|
|||||||
REPORT_ERROR("Unknown CSI x sequence with start and end modifiers: '%c' '%c'", start_modifier, end_modifier);
|
REPORT_ERROR("Unknown CSI x sequence with start and end modifiers: '%c' '%c'", start_modifier, end_modifier);
|
||||||
break;
|
break;
|
||||||
case DECSCUSR:
|
case DECSCUSR:
|
||||||
CALL_CSI_HANDLER1M(screen_set_cursor, 1);
|
if (!start_modifier && end_modifier == ' ') {
|
||||||
|
CALL_CSI_HANDLER1M(screen_set_cursor, 1);
|
||||||
|
}
|
||||||
|
if (start_modifier == '>' && !end_modifier) {
|
||||||
|
CALL_CSI_HANDLER1(screen_xtversion, 0);
|
||||||
|
}
|
||||||
|
REPORT_ERROR("Unknown CSI q sequence with start and end modifiers: '%c' '%c'", start_modifier, end_modifier);
|
||||||
|
break;
|
||||||
case SU:
|
case SU:
|
||||||
NO_MODIFIERS(end_modifier, ' ', "Select presentation directions escape code not implemented");
|
NO_MODIFIERS(end_modifier, ' ', "Select presentation directions escape code not implemented");
|
||||||
CALL_CSI_HANDLER1(screen_scroll, 1);
|
CALL_CSI_HANDLER1(screen_scroll, 1);
|
||||||
|
|||||||
@ -1527,6 +1527,13 @@ report_device_attributes(Screen *self, unsigned int mode, char start_modifier) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
screen_xtversion(Screen *self, unsigned int mode) {
|
||||||
|
if (mode == 0) {
|
||||||
|
write_escape_code_to_child(self, DCS, ">|kitty(" XT_VERSION ")");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
screen_report_size(Screen *self, unsigned int which) {
|
screen_report_size(Screen *self, unsigned int which) {
|
||||||
char buf[32] = {0};
|
char buf[32] = {0};
|
||||||
|
|||||||
@ -166,6 +166,7 @@ void screen_clear_tab_stop(Screen *self, unsigned int how);
|
|||||||
void screen_set_mode(Screen *self, unsigned int mode);
|
void screen_set_mode(Screen *self, unsigned int mode);
|
||||||
void screen_reset_mode(Screen *self, unsigned int mode);
|
void screen_reset_mode(Screen *self, unsigned int mode);
|
||||||
void screen_decsace(Screen *self, unsigned int);
|
void screen_decsace(Screen *self, unsigned int);
|
||||||
|
void screen_xtversion(Screen *self, unsigned int);
|
||||||
void screen_insert_characters(Screen *self, unsigned int count);
|
void screen_insert_characters(Screen *self, unsigned int count);
|
||||||
void screen_cursor_up(Screen *self, unsigned int count/*=1*/, bool do_carriage_return/*=false*/, int move_direction/*=-1*/);
|
void screen_cursor_up(Screen *self, unsigned int count/*=1*/, bool do_carriage_return/*=false*/, int move_direction/*=-1*/);
|
||||||
void screen_set_cursor(Screen *self, unsigned int mode, uint8_t secondary);
|
void screen_set_cursor(Screen *self, unsigned int mode, uint8_t secondary);
|
||||||
|
|||||||
1
setup.py
1
setup.py
@ -374,6 +374,7 @@ def kitty_env() -> Env:
|
|||||||
cppflags = ans.cppflags
|
cppflags = ans.cppflags
|
||||||
cppflags.append('-DPRIMARY_VERSION={}'.format(version[0] + 4000))
|
cppflags.append('-DPRIMARY_VERSION={}'.format(version[0] + 4000))
|
||||||
cppflags.append('-DSECONDARY_VERSION={}'.format(version[1]))
|
cppflags.append('-DSECONDARY_VERSION={}'.format(version[1]))
|
||||||
|
cppflags.append('-DXT_VERSION="{}"'.format('.'.join(map(str, version))))
|
||||||
at_least_version('harfbuzz', 1, 5)
|
at_least_version('harfbuzz', 1, 5)
|
||||||
cflags.extend(pkg_config('libpng', '--cflags-only-I'))
|
cflags.extend(pkg_config('libpng', '--cflags-only-I'))
|
||||||
cflags.extend(pkg_config('lcms2', '--cflags-only-I'))
|
cflags.extend(pkg_config('lcms2', '--cflags-only-I'))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user