From 45b2678db124947d21959c4554f809e73d183436 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 23 Jul 2025 08:56:54 +0530 Subject: [PATCH] Allow backspace to wrap cursor to previous line Fixes #8841 --- .gitattributes | 4 ++++ docs/changelog.rst | 2 ++ kitty/boss.py | 2 +- kitty/screen.c | 45 ++++++++++++++++++++++++++++++---------- kitty/screen.h | 2 +- kitty/terminfo.h | 2 +- kitty/terminfo.py | 6 ++++++ kitty/vt-parser.c | 2 +- kitty_tests/graphics.py | 12 +++++------ kitty_tests/parser.py | 2 +- kitty_tests/screen.py | 34 ++++++++++++++++++++++++------ terminfo/kitty.termcap | 2 +- terminfo/kitty.terminfo | 1 + terminfo/x/xterm-kitty | Bin 3711 -> 3711 bytes 14 files changed, 87 insertions(+), 29 deletions(-) diff --git a/.gitattributes b/.gitattributes index 5937080b8..6ba47ded0 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,7 @@ +kitty/terminfo.h linguist-generated=true +terminfo/kitty.termcap linguist-generated=true +terminfo/kitty.terminfo linguist-generated=true +terminfo/x/xterm-kitty linguist-generated=true kitty/char-props-data.h linguist-generated=true kitty_tests/GraphemeBreakTest.json linguist-generated=true kitty/charsets.c linguist-generated=true diff --git a/docs/changelog.rst b/docs/changelog.rst index c4db86a70..1ff165a95 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -118,6 +118,8 @@ Detailed list of changes - macOS: Fix hiding quick access terminal window not restoring focus to previously active application (:disc:`8840`) +- Allow using backspace to move the cursor onto the previous line in cooked mode. This is indicated by the `bw` propert in kitty's terminfo (:iss:`8841`) + 0.42.2 [2025-07-16] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/kitty/boss.py b/kitty/boss.py index 8f898f80b..e686edb8e 100644 --- a/kitty/boss.py +++ b/kitty/boss.py @@ -282,7 +282,7 @@ class DumpCommands: # {{{ if isinstance(x, dict): return json.dumps(x) return x - safe_print(what, *map(fmt, a)) + safe_print(what, *map(fmt, a), flush=True) # }}} diff --git a/kitty/screen.c b/kitty/screen.c index 9d2b385d1..1f18a110a 100644 --- a/kitty/screen.c +++ b/kitty/screen.c @@ -1066,10 +1066,12 @@ draw_control_char(Screen *self, text_loop_state *s, uint32_t ch) { switch (ch) { case BEL: screen_bell(self); break; - case BS: + case BS: { + index_type before = self->cursor->y; screen_backspace(self); - init_segmentation_state(self, s); - break; + if (before == self->cursor->y) init_segmentation_state(self, s); + else init_text_loop_line(self, s); + } break; case HT: if (UNLIKELY(self->cursor->x >= self->columns)) { if (self->modes.mDECAWM) { @@ -1889,7 +1891,7 @@ screen_is_cursor_visible(const Screen *self) { void screen_backspace(Screen *self) { - screen_cursor_back(self, 1, -1); + screen_cursor_move(self, 1, -1); } void @@ -1960,16 +1962,37 @@ screen_set_tab_stop(Screen *self) { } void -screen_cursor_back(Screen *self, unsigned int count/*=1*/, int move_direction/*=-1*/) { +screen_cursor_move(Screen *self, unsigned int count/*=1*/, int move_direction/*=-1*/) { if (count == 0) count = 1; - if (move_direction < 0 && count > self->cursor->x) self->cursor->x = 0; - else self->cursor->x += move_direction * count; - screen_ensure_bounds(self, false, cursor_within_margins(self)); + bool in_margins = cursor_within_margins(self); + if (move_direction > 0) { + self->cursor->x += count; + screen_ensure_bounds(self, false, in_margins); + } else { + index_type top = in_margins && self->modes.mDECOM ? self->margin_top : 0; + while (count > 0) { + if (count <= self->cursor->x) { + self->cursor->x -= count; + count = 0; + } else { + if (self->cursor->x > 0) { + count -= self->cursor->x; + self->cursor->x = 0; + } else { + if (self->cursor->y == top) count = 0; + else { + count--; self->cursor->y--; + self->cursor->x = self->columns-1; + } + } + } + } + } } void screen_cursor_forward(Screen *self, unsigned int count/*=1*/) { - screen_cursor_back(self, count, 1); + screen_cursor_move(self, count, 1); } void @@ -4437,7 +4460,7 @@ is_using_alternate_linebuf(Screen *self, PyObject *a UNUSED) { Py_RETURN_FALSE; } -WRAP1E(cursor_back, 1, -1) +WRAP1E(cursor_move, 1, -1) WRAP1B(erase_in_line, 0) WRAP1B(erase_in_display, 0) static PyObject* scroll_until_cursor_prompt(Screen *self, PyObject *args) { int b=false; if(!PyArg_ParseTuple(args, "|p", &b)) return NULL; screen_scroll_until_cursor_prompt(self, b); Py_RETURN_NONE; } @@ -5538,7 +5561,7 @@ static PyMethodDef methods[] = { MND(reset_dirty, METH_NOARGS) MND(is_using_alternate_linebuf, METH_NOARGS) MND(is_main_linebuf, METH_NOARGS) - MND(cursor_back, METH_VARARGS) + MND(cursor_move, METH_VARARGS) MND(erase_in_line, METH_VARARGS) MND(erase_in_display, METH_VARARGS) MND(clear_scrollback, METH_NOARGS) diff --git a/kitty/screen.h b/kitty/screen.h index af58b8a81..e5100bbf3 100644 --- a/kitty/screen.h +++ b/kitty/screen.h @@ -186,7 +186,7 @@ void screen_save_modes(Screen *); void screen_save_mode(Screen *, unsigned int); bool write_escape_code_to_child(Screen *self, unsigned char which, const char *data); void screen_cursor_position(Screen*, unsigned int, unsigned int); -void screen_cursor_back(Screen *self, unsigned int count/*=1*/, int move_direction/*=-1*/); +void screen_cursor_move(Screen *self, unsigned int count/*=1*/, int move_direction/*=-1*/); void screen_erase_in_line(Screen *, unsigned int, bool); void screen_erase_in_display(Screen *, unsigned int, bool); void screen_draw_text(Screen *self, const uint32_t *chars, size_t num_chars); diff --git a/kitty/terminfo.h b/kitty/terminfo.h index 8789c5f72..75b6d1582 100644 --- a/kitty/terminfo.h +++ b/kitty/terminfo.h @@ -1,2 +1,2 @@ static const uint8_t terminfo_data[3711] = { -26, 1, 21, 0, 28, 0, 15, 0, 105, 1, 179, 5, 120, 116, 101, 114, 109, 45, 107, 105, 116, 116, 121, 124, 75, 111, 118, 73, 100, 84, 84, 89, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 80, 0, 8, 0, 24, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 1, 255, 127, 0, 0, 4, 0, 6, 0, 8, 0, 25, 0, 30, 0, 38, 0, 42, 0, 46, 0, 255, 255, 57, 0, 74, 0, 76, 0, 80, 0, 87, 0, 255, 255, 89, 0, 102, 0, 255, 255, 106, 0, 110, 0, 120, 0, 124, 0, 128, 0, 255, 255, 135, 0, 255, 255, 139, 0, 144, 0, 255, 255, 153, 0, 158, 0, 255, 255, 255, 255, 163, 0, 168, 0, 173, 0, 178, 0, 187, 0, 191, 0, 198, 0, 255, 255, 207, 0, 212, 0, 218, 0, 224, 0, 255, 255, 242, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 244, 0, 255, 255, 248, 0, 255, 255, 255, 255, 255, 255, 250, 0, 255, 255, 255, 0, 255, 255, 255, 255, 255, 255, 255, 255, 3, 1, 7, 1, 13, 1, 17, 1, 21, 1, 25, 1, 31, 1, 37, 1, 43, 1, 49, 1, 55, 1, 59, 1, 255, 255, 64, 1, 255, 255, 68, 1, 73, 1, 78, 1, 82, 1, 89, 1, 255, 255, 96, 1, 100, 1, 106, 1, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 112, 1, 121, 1, 130, 1, 139, 1, 148, 1, 157, 1, 166, 1, 175, 1, 184, 1, 193, 1, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 202, 1, 222, 1, 255, 255, 255, 255, 255, 255, 229, 1, 232, 1, 243, 1, 246, 1, 248, 1, 251, 1, 77, 2, 255, 255, 80, 2, 82, 2, 255, 255, 255, 255, 255, 255, 87, 2, 88, 2, 255, 255, 89, 2, 90, 2, 255, 255, 255, 255, 91, 2, 255, 255, 156, 2, 255, 255, 255, 255, 160, 2, 166, 2, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 172, 2, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 176, 2, 255, 255, 255, 255, 255, 255, 180, 2, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 181, 2, 182, 2, 255, 255, 255, 255, 255, 255, 255, 255, 189, 2, 255, 255, 255, 255, 196, 2, 255, 255, 255, 255, 255, 255, 255, 255, 203, 2, 210, 2, 217, 2, 255, 255, 255, 255, 224, 2, 255, 255, 231, 2, 255, 255, 255, 255, 255, 255, 238, 2, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 245, 2, 251, 2, 1, 3, 8, 3, 15, 3, 23, 3, 30, 3, 38, 3, 46, 3, 54, 3, 62, 3, 70, 3, 78, 3, 86, 3, 94, 3, 101, 3, 108, 3, 116, 3, 123, 3, 131, 3, 139, 3, 147, 3, 155, 3, 163, 3, 171, 3, 179, 3, 187, 3, 194, 3, 201, 3, 209, 3, 216, 3, 224, 3, 232, 3, 240, 3, 248, 3, 0, 4, 8, 4, 16, 4, 24, 4, 31, 4, 38, 4, 46, 4, 53, 4, 61, 4, 69, 4, 77, 4, 85, 4, 93, 4, 101, 4, 109, 4, 117, 4, 124, 4, 131, 4, 139, 4, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 144, 4, 155, 4, 160, 4, 179, 4, 183, 4, 192, 4, 199, 4, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 37, 5, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 42, 5, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 48, 5, 255, 255, 255, 255, 255, 255, 52, 5, 115, 5, 27, 91, 90, 0, 7, 0, 13, 0, 27, 91, 37, 105, 37, 112, 49, 37, 100, 59, 37, 112, 50, 37, 100, 114, 0, 27, 91, 51, 103, 0, 27, 91, 72, 27, 91, 50, 74, 0, 27, 91, 75, 0, 27, 91, 74, 0, 27, 91, 37, 105, 37, 112, 49, 37, 100, 71, 0, 27, 91, 37, 105, 37, 112, 49, 37, 100, 59, 37, 112, 50, 37, 100, 72, 0, 10, 0, 27, 91, 72, 0, 27, 91, 63, 50, 53, 108, 0, 8, 0, 27, 91, 63, 49, 50, 104, 27, 91, 63, 50, 53, 104, 0, 27, 91, 67, 0, 27, 91, 65, 0, 27, 91, 63, 49, 50, 59, 50, 53, 104, 0, 27, 91, 80, 0, 27, 91, 77, 0, 27, 93, 50, 59, 27, 92, 0, 27, 40, 48, 0, 27, 91, 49, 109, 0, 27, 91, 63, 49, 48, 52, 57, 104, 0, 27, 91, 50, 109, 0, 27, 91, 52, 104, 0, 27, 91, 55, 109, 0, 27, 91, 55, 109, 0, 27, 91, 52, 109, 0, 27, 91, 37, 112, 49, 37, 100, 88, 0, 27, 40, 66, 0, 27, 40, 66, 27, 91, 109, 0, 27, 91, 63, 49, 48, 52, 57, 108, 0, 27, 91, 52, 108, 0, 27, 91, 50, 55, 109, 0, 27, 91, 50, 52, 109, 0, 27, 91, 63, 53, 104, 36, 60, 49, 48, 48, 47, 62, 27, 91, 63, 53, 108, 0, 7, 0, 27, 91, 76, 0, 127, 0, 27, 91, 51, 126, 0, 27, 79, 66, 0, 27, 79, 80, 0, 27, 91, 50, 49, 126, 0, 27, 79, 81, 0, 27, 79, 82, 0, 27, 79, 83, 0, 27, 91, 49, 53, 126, 0, 27, 91, 49, 55, 126, 0, 27, 91, 49, 56, 126, 0, 27, 91, 49, 57, 126, 0, 27, 91, 50, 48, 126, 0, 27, 79, 72, 0, 27, 91, 50, 126, 0, 27, 79, 68, 0, 27, 91, 54, 126, 0, 27, 91, 53, 126, 0, 27, 79, 67, 0, 27, 91, 49, 59, 50, 66, 0, 27, 91, 49, 59, 50, 65, 0, 27, 79, 65, 0, 27, 91, 63, 49, 108, 0, 27, 91, 63, 49, 104, 0, 27, 91, 37, 112, 49, 37, 100, 80, 0, 27, 91, 37, 112, 49, 37, 100, 77, 0, 27, 91, 37, 112, 49, 37, 100, 66, 0, 27, 91, 37, 112, 49, 37, 100, 64, 0, 27, 91, 37, 112, 49, 37, 100, 83, 0, 27, 91, 37, 112, 49, 37, 100, 76, 0, 27, 91, 37, 112, 49, 37, 100, 68, 0, 27, 91, 37, 112, 49, 37, 100, 67, 0, 27, 91, 37, 112, 49, 37, 100, 84, 0, 27, 91, 37, 112, 49, 37, 100, 65, 0, 37, 112, 49, 37, 99, 27, 91, 37, 112, 50, 37, 123, 49, 125, 37, 45, 37, 100, 98, 0, 27, 93, 27, 92, 27, 99, 0, 27, 56, 0, 27, 91, 37, 105, 37, 112, 49, 37, 100, 100, 0, 27, 55, 0, 10, 0, 27, 77, 0, 37, 63, 37, 112, 57, 37, 116, 27, 40, 48, 37, 101, 27, 40, 66, 37, 59, 27, 91, 48, 37, 63, 37, 112, 54, 37, 116, 59, 49, 37, 59, 37, 63, 37, 112, 50, 37, 116, 59, 52, 37, 59, 37, 63, 37, 112, 49, 37, 112, 51, 37, 124, 37, 116, 59, 55, 37, 59, 37, 63, 37, 112, 52, 37, 116, 59, 53, 37, 59, 37, 63, 37, 112, 55, 37, 116, 59, 56, 37, 59, 109, 0, 27, 72, 0, 9, 0, 27, 93, 50, 59, 0, 0, 0, 0, 0, 43, 43, 44, 44, 45, 45, 46, 46, 48, 48, 96, 96, 97, 97, 102, 102, 103, 103, 104, 104, 105, 105, 106, 106, 107, 107, 108, 108, 109, 109, 110, 110, 111, 111, 112, 112, 113, 113, 114, 114, 115, 115, 116, 116, 117, 117, 118, 118, 119, 119, 120, 120, 121, 121, 122, 122, 123, 123, 124, 124, 125, 125, 126, 126, 0, 27, 91, 90, 0, 27, 91, 63, 55, 104, 0, 27, 91, 63, 55, 108, 0, 27, 79, 69, 0, 27, 79, 70, 0, 0, 0, 27, 91, 49, 59, 50, 69, 0, 27, 91, 51, 59, 50, 126, 0, 27, 91, 49, 59, 50, 70, 0, 27, 91, 49, 59, 50, 72, 0, 27, 91, 50, 59, 50, 126, 0, 27, 91, 49, 59, 50, 68, 0, 27, 91, 54, 59, 50, 126, 0, 27, 91, 53, 59, 50, 126, 0, 27, 91, 49, 59, 50, 67, 0, 27, 91, 50, 51, 126, 0, 27, 91, 50, 52, 126, 0, 27, 91, 49, 59, 50, 80, 0, 27, 91, 49, 59, 50, 81, 0, 27, 91, 49, 51, 59, 50, 126, 0, 27, 91, 49, 59, 50, 83, 0, 27, 91, 49, 53, 59, 50, 126, 0, 27, 91, 49, 55, 59, 50, 126, 0, 27, 91, 49, 56, 59, 50, 126, 0, 27, 91, 49, 57, 59, 50, 126, 0, 27, 91, 50, 48, 59, 50, 126, 0, 27, 91, 50, 49, 59, 50, 126, 0, 27, 91, 50, 51, 59, 50, 126, 0, 27, 91, 50, 52, 59, 50, 126, 0, 27, 91, 49, 59, 53, 80, 0, 27, 91, 49, 59, 53, 81, 0, 27, 91, 49, 51, 59, 53, 126, 0, 27, 91, 49, 59, 53, 83, 0, 27, 91, 49, 53, 59, 53, 126, 0, 27, 91, 49, 55, 59, 53, 126, 0, 27, 91, 49, 56, 59, 53, 126, 0, 27, 91, 49, 57, 59, 53, 126, 0, 27, 91, 50, 48, 59, 53, 126, 0, 27, 91, 50, 49, 59, 53, 126, 0, 27, 91, 50, 51, 59, 53, 126, 0, 27, 91, 50, 52, 59, 53, 126, 0, 27, 91, 49, 59, 54, 80, 0, 27, 91, 49, 59, 54, 81, 0, 27, 91, 49, 51, 59, 54, 126, 0, 27, 91, 49, 59, 54, 83, 0, 27, 91, 49, 53, 59, 54, 126, 0, 27, 91, 49, 55, 59, 54, 126, 0, 27, 91, 49, 56, 59, 54, 126, 0, 27, 91, 49, 57, 59, 54, 126, 0, 27, 91, 50, 48, 59, 54, 126, 0, 27, 91, 50, 49, 59, 54, 126, 0, 27, 91, 50, 51, 59, 54, 126, 0, 27, 91, 50, 52, 59, 54, 126, 0, 27, 91, 49, 59, 51, 80, 0, 27, 91, 49, 59, 51, 81, 0, 27, 91, 49, 51, 59, 51, 126, 0, 27, 91, 49, 59, 51, 83, 0, 27, 91, 49, 53, 59, 51, 126, 0, 27, 91, 49, 55, 59, 51, 126, 0, 27, 91, 49, 56, 59, 51, 126, 0, 27, 91, 49, 57, 59, 51, 126, 0, 27, 91, 50, 48, 59, 51, 126, 0, 27, 91, 50, 49, 59, 51, 126, 0, 27, 91, 50, 51, 59, 51, 126, 0, 27, 91, 50, 52, 59, 51, 126, 0, 27, 91, 49, 59, 52, 80, 0, 27, 91, 49, 59, 52, 81, 0, 27, 91, 49, 51, 59, 52, 126, 0, 27, 91, 49, 75, 0, 27, 91, 37, 105, 37, 100, 59, 37, 100, 82, 0, 27, 91, 54, 110, 0, 27, 91, 63, 37, 91, 59, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 93, 99, 0, 27, 91, 99, 0, 27, 91, 51, 57, 59, 52, 57, 109, 0, 27, 93, 49, 48, 52, 7, 0, 27, 93, 52, 59, 37, 112, 49, 37, 100, 59, 114, 103, 98, 58, 37, 112, 50, 37, 123, 50, 53, 53, 125, 37, 42, 37, 123, 49, 48, 48, 48, 125, 37, 47, 37, 50, 46, 50, 88, 47, 37, 112, 51, 37, 123, 50, 53, 53, 125, 37, 42, 37, 123, 49, 48, 48, 48, 125, 37, 47, 37, 50, 46, 50, 88, 47, 37, 112, 52, 37, 123, 50, 53, 53, 125, 37, 42, 37, 123, 49, 48, 48, 48, 125, 37, 47, 37, 50, 46, 50, 88, 27, 92, 0, 27, 91, 51, 109, 0, 27, 91, 50, 51, 109, 0, 27, 91, 77, 0, 27, 91, 37, 63, 37, 112, 49, 37, 123, 56, 125, 37, 60, 37, 116, 51, 37, 112, 49, 37, 100, 37, 101, 37, 112, 49, 37, 123, 49, 54, 125, 37, 60, 37, 116, 57, 37, 112, 49, 37, 123, 56, 125, 37, 45, 37, 100, 37, 101, 51, 56, 59, 53, 59, 37, 112, 49, 37, 100, 37, 59, 109, 0, 27, 91, 37, 63, 37, 112, 49, 37, 123, 56, 125, 37, 60, 37, 116, 52, 37, 112, 49, 37, 100, 37, 101, 37, 112, 49, 37, 123, 49, 54, 125, 37, 60, 37, 116, 49, 48, 37, 112, 49, 37, 123, 56, 125, 37, 45, 37, 100, 37, 101, 52, 56, 59, 53, 59, 37, 112, 49, 37, 100, 37, 59, 109, 0, 0, 4, 0, 0, 0, 79, 0, 162, 0, 75, 4, 1, 1, 1, 1, 0, 0, 9, 0, 18, 0, 25, 0, 37, 0, 56, 0, 63, 0, 70, 0, 75, 0, 81, 0, 143, 0, 154, 0, 164, 0, 176, 0, 182, 0, 191, 0, 200, 0, 207, 0, 214, 0, 221, 0, 228, 0, 235, 0, 242, 0, 249, 0, 0, 1, 7, 1, 14, 1, 21, 1, 28, 1, 35, 1, 42, 1, 49, 1, 56, 1, 63, 1, 70, 1, 77, 1, 84, 1, 91, 1, 98, 1, 105, 1, 112, 1, 119, 1, 126, 1, 133, 1, 140, 1, 147, 1, 154, 1, 161, 1, 168, 1, 175, 1, 182, 1, 189, 1, 196, 1, 203, 1, 210, 1, 217, 1, 224, 1, 231, 1, 238, 1, 245, 1, 252, 1, 3, 2, 10, 2, 17, 2, 24, 2, 31, 2, 38, 2, 45, 2, 52, 2, 59, 2, 66, 2, 73, 2, 80, 2, 87, 2, 91, 2, 95, 2, 101, 2, 127, 2, 153, 2, 0, 0, 3, 0, 6, 0, 9, 0, 17, 0, 20, 0, 23, 0, 26, 0, 29, 0, 32, 0, 35, 0, 38, 0, 41, 0, 44, 0, 51, 0, 57, 0, 60, 0, 65, 0, 68, 0, 71, 0, 74, 0, 80, 0, 86, 0, 92, 0, 98, 0, 104, 0, 109, 0, 114, 0, 119, 0, 124, 0, 129, 0, 133, 0, 138, 0, 143, 0, 148, 0, 153, 0, 158, 0, 164, 0, 170, 0, 176, 0, 182, 0, 188, 0, 194, 0, 200, 0, 206, 0, 212, 0, 218, 0, 223, 0, 228, 0, 233, 0, 238, 0, 243, 0, 249, 0, 255, 0, 5, 1, 11, 1, 17, 1, 23, 1, 29, 1, 35, 1, 41, 1, 47, 1, 53, 1, 59, 1, 65, 1, 71, 1, 77, 1, 83, 1, 89, 1, 95, 1, 101, 1, 107, 1, 111, 1, 116, 1, 121, 1, 126, 1, 131, 1, 136, 1, 141, 1, 147, 1, 152, 1, 160, 1, 168, 1, 27, 91, 63, 50, 48, 48, 52, 108, 0, 27, 91, 63, 50, 48, 48, 52, 104, 0, 27, 93, 49, 49, 50, 7, 0, 27, 93, 49, 50, 59, 37, 112, 49, 37, 115, 7, 0, 27, 93, 53, 50, 59, 37, 112, 49, 37, 115, 59, 37, 112, 50, 37, 115, 27, 92, 0, 27, 91, 50, 48, 49, 126, 0, 27, 91, 50, 48, 48, 126, 0, 27, 91, 62, 99, 0, 27, 91, 50, 32, 113, 0, 27, 91, 53, 56, 58, 50, 58, 37, 112, 49, 37, 123, 54, 53, 53, 51, 54, 125, 37, 47, 37, 100, 58, 37, 112, 49, 37, 123, 50, 53, 54, 125, 37, 47, 37, 123, 50, 53, 53, 125, 37, 38, 37, 100, 58, 37, 112, 49, 37, 123, 50, 53, 53, 125, 37, 38, 37, 100, 37, 59, 109, 0, 27, 91, 52, 58, 37, 112, 49, 37, 100, 109, 0, 27, 91, 37, 112, 49, 37, 100, 32, 113, 0, 27, 80, 61, 37, 112, 49, 37, 100, 115, 27, 92, 0, 27, 91, 62, 48, 113, 0, 27, 91, 63, 49, 48, 48, 52, 108, 0, 27, 91, 63, 49, 48, 48, 52, 104, 0, 27, 91, 49, 59, 51, 69, 0, 27, 91, 49, 59, 52, 69, 0, 27, 91, 49, 59, 53, 69, 0, 27, 91, 49, 59, 54, 69, 0, 27, 91, 49, 59, 55, 69, 0, 27, 91, 51, 59, 51, 126, 0, 27, 91, 51, 59, 52, 126, 0, 27, 91, 51, 59, 53, 126, 0, 27, 91, 51, 59, 54, 126, 0, 27, 91, 51, 59, 55, 126, 0, 27, 91, 49, 59, 50, 66, 0, 27, 91, 49, 59, 51, 66, 0, 27, 91, 49, 59, 52, 66, 0, 27, 91, 49, 59, 53, 66, 0, 27, 91, 49, 59, 54, 66, 0, 27, 91, 49, 59, 55, 66, 0, 27, 91, 49, 59, 51, 70, 0, 27, 91, 49, 59, 52, 70, 0, 27, 91, 49, 59, 53, 70, 0, 27, 91, 49, 59, 54, 70, 0, 27, 91, 49, 59, 55, 70, 0, 27, 91, 49, 59, 51, 72, 0, 27, 91, 49, 59, 52, 72, 0, 27, 91, 49, 59, 53, 72, 0, 27, 91, 49, 59, 54, 72, 0, 27, 91, 49, 59, 55, 72, 0, 27, 91, 50, 59, 51, 126, 0, 27, 91, 50, 59, 52, 126, 0, 27, 91, 50, 59, 53, 126, 0, 27, 91, 50, 59, 54, 126, 0, 27, 91, 50, 59, 55, 126, 0, 27, 91, 49, 59, 51, 68, 0, 27, 91, 49, 59, 52, 68, 0, 27, 91, 49, 59, 53, 68, 0, 27, 91, 49, 59, 54, 68, 0, 27, 91, 49, 59, 55, 68, 0, 27, 91, 54, 59, 51, 126, 0, 27, 91, 54, 59, 52, 126, 0, 27, 91, 54, 59, 53, 126, 0, 27, 91, 54, 59, 54, 126, 0, 27, 91, 54, 59, 55, 126, 0, 27, 91, 53, 59, 51, 126, 0, 27, 91, 53, 59, 52, 126, 0, 27, 91, 53, 59, 53, 126, 0, 27, 91, 53, 59, 54, 126, 0, 27, 91, 53, 59, 55, 126, 0, 27, 91, 49, 59, 51, 67, 0, 27, 91, 49, 59, 52, 67, 0, 27, 91, 49, 59, 53, 67, 0, 27, 91, 49, 59, 54, 67, 0, 27, 91, 49, 59, 55, 67, 0, 27, 91, 49, 59, 50, 65, 0, 27, 91, 49, 59, 51, 65, 0, 27, 91, 49, 59, 52, 65, 0, 27, 91, 49, 59, 53, 65, 0, 27, 91, 49, 59, 54, 65, 0, 27, 91, 49, 59, 55, 65, 0, 27, 91, 73, 0, 27, 91, 79, 0, 27, 91, 50, 57, 109, 0, 27, 91, 52, 56, 58, 50, 58, 37, 112, 49, 37, 100, 58, 37, 112, 50, 37, 100, 58, 37, 112, 51, 37, 100, 109, 0, 27, 91, 51, 56, 58, 50, 58, 37, 112, 49, 37, 100, 58, 37, 112, 50, 37, 100, 58, 37, 112, 51, 37, 100, 109, 0, 27, 91, 57, 109, 0, 83, 117, 0, 84, 99, 0, 88, 70, 0, 102, 117, 108, 108, 107, 98, 100, 0, 66, 68, 0, 66, 69, 0, 67, 114, 0, 67, 115, 0, 77, 115, 0, 80, 69, 0, 80, 83, 0, 82, 86, 0, 83, 101, 0, 83, 101, 116, 117, 108, 99, 0, 83, 109, 117, 108, 120, 0, 83, 115, 0, 83, 121, 110, 99, 0, 88, 82, 0, 102, 100, 0, 102, 101, 0, 107, 66, 69, 71, 51, 0, 107, 66, 69, 71, 52, 0, 107, 66, 69, 71, 53, 0, 107, 66, 69, 71, 54, 0, 107, 66, 69, 71, 55, 0, 107, 68, 67, 51, 0, 107, 68, 67, 52, 0, 107, 68, 67, 53, 0, 107, 68, 67, 54, 0, 107, 68, 67, 55, 0, 107, 68, 78, 0, 107, 68, 78, 51, 0, 107, 68, 78, 52, 0, 107, 68, 78, 53, 0, 107, 68, 78, 54, 0, 107, 68, 78, 55, 0, 107, 69, 78, 68, 51, 0, 107, 69, 78, 68, 52, 0, 107, 69, 78, 68, 53, 0, 107, 69, 78, 68, 54, 0, 107, 69, 78, 68, 55, 0, 107, 72, 79, 77, 51, 0, 107, 72, 79, 77, 52, 0, 107, 72, 79, 77, 53, 0, 107, 72, 79, 77, 54, 0, 107, 72, 79, 77, 55, 0, 107, 73, 67, 51, 0, 107, 73, 67, 52, 0, 107, 73, 67, 53, 0, 107, 73, 67, 54, 0, 107, 73, 67, 55, 0, 107, 76, 70, 84, 51, 0, 107, 76, 70, 84, 52, 0, 107, 76, 70, 84, 53, 0, 107, 76, 70, 84, 54, 0, 107, 76, 70, 84, 55, 0, 107, 78, 88, 84, 51, 0, 107, 78, 88, 84, 52, 0, 107, 78, 88, 84, 53, 0, 107, 78, 88, 84, 54, 0, 107, 78, 88, 84, 55, 0, 107, 80, 82, 86, 51, 0, 107, 80, 82, 86, 52, 0, 107, 80, 82, 86, 53, 0, 107, 80, 82, 86, 54, 0, 107, 80, 82, 86, 55, 0, 107, 82, 73, 84, 51, 0, 107, 82, 73, 84, 52, 0, 107, 82, 73, 84, 53, 0, 107, 82, 73, 84, 54, 0, 107, 82, 73, 84, 55, 0, 107, 85, 80, 0, 107, 85, 80, 51, 0, 107, 85, 80, 52, 0, 107, 85, 80, 53, 0, 107, 85, 80, 54, 0, 107, 85, 80, 55, 0, 107, 120, 73, 78, 0, 107, 120, 79, 85, 84, 0, 114, 109, 120, 120, 0, 115, 101, 116, 114, 103, 98, 98, 0, 115, 101, 116, 114, 103, 98, 102, 0, 115, 109, 120, 120, 0, }; +26, 1, 21, 0, 28, 0, 15, 0, 105, 1, 179, 5, 120, 116, 101, 114, 109, 45, 107, 105, 116, 116, 121, 124, 75, 111, 118, 73, 100, 84, 84, 89, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 80, 0, 8, 0, 24, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 1, 255, 127, 0, 0, 4, 0, 6, 0, 8, 0, 25, 0, 30, 0, 38, 0, 42, 0, 46, 0, 255, 255, 57, 0, 74, 0, 76, 0, 80, 0, 87, 0, 255, 255, 89, 0, 102, 0, 255, 255, 106, 0, 110, 0, 120, 0, 124, 0, 128, 0, 255, 255, 135, 0, 255, 255, 139, 0, 144, 0, 255, 255, 153, 0, 158, 0, 255, 255, 255, 255, 163, 0, 168, 0, 173, 0, 178, 0, 187, 0, 191, 0, 198, 0, 255, 255, 207, 0, 212, 0, 218, 0, 224, 0, 255, 255, 242, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 244, 0, 255, 255, 248, 0, 255, 255, 255, 255, 255, 255, 250, 0, 255, 255, 255, 0, 255, 255, 255, 255, 255, 255, 255, 255, 3, 1, 7, 1, 13, 1, 17, 1, 21, 1, 25, 1, 31, 1, 37, 1, 43, 1, 49, 1, 55, 1, 59, 1, 255, 255, 64, 1, 255, 255, 68, 1, 73, 1, 78, 1, 82, 1, 89, 1, 255, 255, 96, 1, 100, 1, 106, 1, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 112, 1, 121, 1, 130, 1, 139, 1, 148, 1, 157, 1, 166, 1, 175, 1, 184, 1, 193, 1, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 202, 1, 222, 1, 255, 255, 255, 255, 255, 255, 229, 1, 232, 1, 243, 1, 246, 1, 248, 1, 251, 1, 77, 2, 255, 255, 80, 2, 82, 2, 255, 255, 255, 255, 255, 255, 87, 2, 88, 2, 255, 255, 89, 2, 90, 2, 255, 255, 255, 255, 91, 2, 255, 255, 156, 2, 255, 255, 255, 255, 160, 2, 166, 2, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 172, 2, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 176, 2, 255, 255, 255, 255, 255, 255, 180, 2, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 181, 2, 182, 2, 255, 255, 255, 255, 255, 255, 255, 255, 189, 2, 255, 255, 255, 255, 196, 2, 255, 255, 255, 255, 255, 255, 255, 255, 203, 2, 210, 2, 217, 2, 255, 255, 255, 255, 224, 2, 255, 255, 231, 2, 255, 255, 255, 255, 255, 255, 238, 2, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 245, 2, 251, 2, 1, 3, 8, 3, 15, 3, 23, 3, 30, 3, 38, 3, 46, 3, 54, 3, 62, 3, 70, 3, 78, 3, 86, 3, 94, 3, 101, 3, 108, 3, 116, 3, 123, 3, 131, 3, 139, 3, 147, 3, 155, 3, 163, 3, 171, 3, 179, 3, 187, 3, 194, 3, 201, 3, 209, 3, 216, 3, 224, 3, 232, 3, 240, 3, 248, 3, 0, 4, 8, 4, 16, 4, 24, 4, 31, 4, 38, 4, 46, 4, 53, 4, 61, 4, 69, 4, 77, 4, 85, 4, 93, 4, 101, 4, 109, 4, 117, 4, 124, 4, 131, 4, 139, 4, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 144, 4, 155, 4, 160, 4, 179, 4, 183, 4, 192, 4, 199, 4, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 37, 5, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 42, 5, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 48, 5, 255, 255, 255, 255, 255, 255, 52, 5, 115, 5, 27, 91, 90, 0, 7, 0, 13, 0, 27, 91, 37, 105, 37, 112, 49, 37, 100, 59, 37, 112, 50, 37, 100, 114, 0, 27, 91, 51, 103, 0, 27, 91, 72, 27, 91, 50, 74, 0, 27, 91, 75, 0, 27, 91, 74, 0, 27, 91, 37, 105, 37, 112, 49, 37, 100, 71, 0, 27, 91, 37, 105, 37, 112, 49, 37, 100, 59, 37, 112, 50, 37, 100, 72, 0, 10, 0, 27, 91, 72, 0, 27, 91, 63, 50, 53, 108, 0, 8, 0, 27, 91, 63, 49, 50, 104, 27, 91, 63, 50, 53, 104, 0, 27, 91, 67, 0, 27, 91, 65, 0, 27, 91, 63, 49, 50, 59, 50, 53, 104, 0, 27, 91, 80, 0, 27, 91, 77, 0, 27, 93, 50, 59, 27, 92, 0, 27, 40, 48, 0, 27, 91, 49, 109, 0, 27, 91, 63, 49, 48, 52, 57, 104, 0, 27, 91, 50, 109, 0, 27, 91, 52, 104, 0, 27, 91, 55, 109, 0, 27, 91, 55, 109, 0, 27, 91, 52, 109, 0, 27, 91, 37, 112, 49, 37, 100, 88, 0, 27, 40, 66, 0, 27, 40, 66, 27, 91, 109, 0, 27, 91, 63, 49, 48, 52, 57, 108, 0, 27, 91, 52, 108, 0, 27, 91, 50, 55, 109, 0, 27, 91, 50, 52, 109, 0, 27, 91, 63, 53, 104, 36, 60, 49, 48, 48, 47, 62, 27, 91, 63, 53, 108, 0, 7, 0, 27, 91, 76, 0, 127, 0, 27, 91, 51, 126, 0, 27, 79, 66, 0, 27, 79, 80, 0, 27, 91, 50, 49, 126, 0, 27, 79, 81, 0, 27, 79, 82, 0, 27, 79, 83, 0, 27, 91, 49, 53, 126, 0, 27, 91, 49, 55, 126, 0, 27, 91, 49, 56, 126, 0, 27, 91, 49, 57, 126, 0, 27, 91, 50, 48, 126, 0, 27, 79, 72, 0, 27, 91, 50, 126, 0, 27, 79, 68, 0, 27, 91, 54, 126, 0, 27, 91, 53, 126, 0, 27, 79, 67, 0, 27, 91, 49, 59, 50, 66, 0, 27, 91, 49, 59, 50, 65, 0, 27, 79, 65, 0, 27, 91, 63, 49, 108, 0, 27, 91, 63, 49, 104, 0, 27, 91, 37, 112, 49, 37, 100, 80, 0, 27, 91, 37, 112, 49, 37, 100, 77, 0, 27, 91, 37, 112, 49, 37, 100, 66, 0, 27, 91, 37, 112, 49, 37, 100, 64, 0, 27, 91, 37, 112, 49, 37, 100, 83, 0, 27, 91, 37, 112, 49, 37, 100, 76, 0, 27, 91, 37, 112, 49, 37, 100, 68, 0, 27, 91, 37, 112, 49, 37, 100, 67, 0, 27, 91, 37, 112, 49, 37, 100, 84, 0, 27, 91, 37, 112, 49, 37, 100, 65, 0, 37, 112, 49, 37, 99, 27, 91, 37, 112, 50, 37, 123, 49, 125, 37, 45, 37, 100, 98, 0, 27, 93, 27, 92, 27, 99, 0, 27, 56, 0, 27, 91, 37, 105, 37, 112, 49, 37, 100, 100, 0, 27, 55, 0, 10, 0, 27, 77, 0, 37, 63, 37, 112, 57, 37, 116, 27, 40, 48, 37, 101, 27, 40, 66, 37, 59, 27, 91, 48, 37, 63, 37, 112, 54, 37, 116, 59, 49, 37, 59, 37, 63, 37, 112, 50, 37, 116, 59, 52, 37, 59, 37, 63, 37, 112, 49, 37, 112, 51, 37, 124, 37, 116, 59, 55, 37, 59, 37, 63, 37, 112, 52, 37, 116, 59, 53, 37, 59, 37, 63, 37, 112, 55, 37, 116, 59, 56, 37, 59, 109, 0, 27, 72, 0, 9, 0, 27, 93, 50, 59, 0, 0, 0, 0, 0, 43, 43, 44, 44, 45, 45, 46, 46, 48, 48, 96, 96, 97, 97, 102, 102, 103, 103, 104, 104, 105, 105, 106, 106, 107, 107, 108, 108, 109, 109, 110, 110, 111, 111, 112, 112, 113, 113, 114, 114, 115, 115, 116, 116, 117, 117, 118, 118, 119, 119, 120, 120, 121, 121, 122, 122, 123, 123, 124, 124, 125, 125, 126, 126, 0, 27, 91, 90, 0, 27, 91, 63, 55, 104, 0, 27, 91, 63, 55, 108, 0, 27, 79, 69, 0, 27, 79, 70, 0, 0, 0, 27, 91, 49, 59, 50, 69, 0, 27, 91, 51, 59, 50, 126, 0, 27, 91, 49, 59, 50, 70, 0, 27, 91, 49, 59, 50, 72, 0, 27, 91, 50, 59, 50, 126, 0, 27, 91, 49, 59, 50, 68, 0, 27, 91, 54, 59, 50, 126, 0, 27, 91, 53, 59, 50, 126, 0, 27, 91, 49, 59, 50, 67, 0, 27, 91, 50, 51, 126, 0, 27, 91, 50, 52, 126, 0, 27, 91, 49, 59, 50, 80, 0, 27, 91, 49, 59, 50, 81, 0, 27, 91, 49, 51, 59, 50, 126, 0, 27, 91, 49, 59, 50, 83, 0, 27, 91, 49, 53, 59, 50, 126, 0, 27, 91, 49, 55, 59, 50, 126, 0, 27, 91, 49, 56, 59, 50, 126, 0, 27, 91, 49, 57, 59, 50, 126, 0, 27, 91, 50, 48, 59, 50, 126, 0, 27, 91, 50, 49, 59, 50, 126, 0, 27, 91, 50, 51, 59, 50, 126, 0, 27, 91, 50, 52, 59, 50, 126, 0, 27, 91, 49, 59, 53, 80, 0, 27, 91, 49, 59, 53, 81, 0, 27, 91, 49, 51, 59, 53, 126, 0, 27, 91, 49, 59, 53, 83, 0, 27, 91, 49, 53, 59, 53, 126, 0, 27, 91, 49, 55, 59, 53, 126, 0, 27, 91, 49, 56, 59, 53, 126, 0, 27, 91, 49, 57, 59, 53, 126, 0, 27, 91, 50, 48, 59, 53, 126, 0, 27, 91, 50, 49, 59, 53, 126, 0, 27, 91, 50, 51, 59, 53, 126, 0, 27, 91, 50, 52, 59, 53, 126, 0, 27, 91, 49, 59, 54, 80, 0, 27, 91, 49, 59, 54, 81, 0, 27, 91, 49, 51, 59, 54, 126, 0, 27, 91, 49, 59, 54, 83, 0, 27, 91, 49, 53, 59, 54, 126, 0, 27, 91, 49, 55, 59, 54, 126, 0, 27, 91, 49, 56, 59, 54, 126, 0, 27, 91, 49, 57, 59, 54, 126, 0, 27, 91, 50, 48, 59, 54, 126, 0, 27, 91, 50, 49, 59, 54, 126, 0, 27, 91, 50, 51, 59, 54, 126, 0, 27, 91, 50, 52, 59, 54, 126, 0, 27, 91, 49, 59, 51, 80, 0, 27, 91, 49, 59, 51, 81, 0, 27, 91, 49, 51, 59, 51, 126, 0, 27, 91, 49, 59, 51, 83, 0, 27, 91, 49, 53, 59, 51, 126, 0, 27, 91, 49, 55, 59, 51, 126, 0, 27, 91, 49, 56, 59, 51, 126, 0, 27, 91, 49, 57, 59, 51, 126, 0, 27, 91, 50, 48, 59, 51, 126, 0, 27, 91, 50, 49, 59, 51, 126, 0, 27, 91, 50, 51, 59, 51, 126, 0, 27, 91, 50, 52, 59, 51, 126, 0, 27, 91, 49, 59, 52, 80, 0, 27, 91, 49, 59, 52, 81, 0, 27, 91, 49, 51, 59, 52, 126, 0, 27, 91, 49, 75, 0, 27, 91, 37, 105, 37, 100, 59, 37, 100, 82, 0, 27, 91, 54, 110, 0, 27, 91, 63, 37, 91, 59, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 93, 99, 0, 27, 91, 99, 0, 27, 91, 51, 57, 59, 52, 57, 109, 0, 27, 93, 49, 48, 52, 7, 0, 27, 93, 52, 59, 37, 112, 49, 37, 100, 59, 114, 103, 98, 58, 37, 112, 50, 37, 123, 50, 53, 53, 125, 37, 42, 37, 123, 49, 48, 48, 48, 125, 37, 47, 37, 50, 46, 50, 88, 47, 37, 112, 51, 37, 123, 50, 53, 53, 125, 37, 42, 37, 123, 49, 48, 48, 48, 125, 37, 47, 37, 50, 46, 50, 88, 47, 37, 112, 52, 37, 123, 50, 53, 53, 125, 37, 42, 37, 123, 49, 48, 48, 48, 125, 37, 47, 37, 50, 46, 50, 88, 27, 92, 0, 27, 91, 51, 109, 0, 27, 91, 50, 51, 109, 0, 27, 91, 77, 0, 27, 91, 37, 63, 37, 112, 49, 37, 123, 56, 125, 37, 60, 37, 116, 51, 37, 112, 49, 37, 100, 37, 101, 37, 112, 49, 37, 123, 49, 54, 125, 37, 60, 37, 116, 57, 37, 112, 49, 37, 123, 56, 125, 37, 45, 37, 100, 37, 101, 51, 56, 59, 53, 59, 37, 112, 49, 37, 100, 37, 59, 109, 0, 27, 91, 37, 63, 37, 112, 49, 37, 123, 56, 125, 37, 60, 37, 116, 52, 37, 112, 49, 37, 100, 37, 101, 37, 112, 49, 37, 123, 49, 54, 125, 37, 60, 37, 116, 49, 48, 37, 112, 49, 37, 123, 56, 125, 37, 45, 37, 100, 37, 101, 52, 56, 59, 53, 59, 37, 112, 49, 37, 100, 37, 59, 109, 0, 0, 4, 0, 0, 0, 79, 0, 162, 0, 75, 4, 1, 1, 1, 1, 0, 0, 9, 0, 18, 0, 25, 0, 37, 0, 56, 0, 63, 0, 70, 0, 75, 0, 81, 0, 143, 0, 154, 0, 164, 0, 176, 0, 182, 0, 191, 0, 200, 0, 207, 0, 214, 0, 221, 0, 228, 0, 235, 0, 242, 0, 249, 0, 0, 1, 7, 1, 14, 1, 21, 1, 28, 1, 35, 1, 42, 1, 49, 1, 56, 1, 63, 1, 70, 1, 77, 1, 84, 1, 91, 1, 98, 1, 105, 1, 112, 1, 119, 1, 126, 1, 133, 1, 140, 1, 147, 1, 154, 1, 161, 1, 168, 1, 175, 1, 182, 1, 189, 1, 196, 1, 203, 1, 210, 1, 217, 1, 224, 1, 231, 1, 238, 1, 245, 1, 252, 1, 3, 2, 10, 2, 17, 2, 24, 2, 31, 2, 38, 2, 45, 2, 52, 2, 59, 2, 66, 2, 73, 2, 80, 2, 87, 2, 91, 2, 95, 2, 101, 2, 127, 2, 153, 2, 0, 0, 3, 0, 6, 0, 9, 0, 17, 0, 20, 0, 23, 0, 26, 0, 29, 0, 32, 0, 35, 0, 38, 0, 41, 0, 44, 0, 51, 0, 57, 0, 60, 0, 65, 0, 68, 0, 71, 0, 74, 0, 80, 0, 86, 0, 92, 0, 98, 0, 104, 0, 109, 0, 114, 0, 119, 0, 124, 0, 129, 0, 133, 0, 138, 0, 143, 0, 148, 0, 153, 0, 158, 0, 164, 0, 170, 0, 176, 0, 182, 0, 188, 0, 194, 0, 200, 0, 206, 0, 212, 0, 218, 0, 223, 0, 228, 0, 233, 0, 238, 0, 243, 0, 249, 0, 255, 0, 5, 1, 11, 1, 17, 1, 23, 1, 29, 1, 35, 1, 41, 1, 47, 1, 53, 1, 59, 1, 65, 1, 71, 1, 77, 1, 83, 1, 89, 1, 95, 1, 101, 1, 107, 1, 111, 1, 116, 1, 121, 1, 126, 1, 131, 1, 136, 1, 141, 1, 147, 1, 152, 1, 160, 1, 168, 1, 27, 91, 63, 50, 48, 48, 52, 108, 0, 27, 91, 63, 50, 48, 48, 52, 104, 0, 27, 93, 49, 49, 50, 7, 0, 27, 93, 49, 50, 59, 37, 112, 49, 37, 115, 7, 0, 27, 93, 53, 50, 59, 37, 112, 49, 37, 115, 59, 37, 112, 50, 37, 115, 27, 92, 0, 27, 91, 50, 48, 49, 126, 0, 27, 91, 50, 48, 48, 126, 0, 27, 91, 62, 99, 0, 27, 91, 50, 32, 113, 0, 27, 91, 53, 56, 58, 50, 58, 37, 112, 49, 37, 123, 54, 53, 53, 51, 54, 125, 37, 47, 37, 100, 58, 37, 112, 49, 37, 123, 50, 53, 54, 125, 37, 47, 37, 123, 50, 53, 53, 125, 37, 38, 37, 100, 58, 37, 112, 49, 37, 123, 50, 53, 53, 125, 37, 38, 37, 100, 37, 59, 109, 0, 27, 91, 52, 58, 37, 112, 49, 37, 100, 109, 0, 27, 91, 37, 112, 49, 37, 100, 32, 113, 0, 27, 80, 61, 37, 112, 49, 37, 100, 115, 27, 92, 0, 27, 91, 62, 48, 113, 0, 27, 91, 63, 49, 48, 48, 52, 108, 0, 27, 91, 63, 49, 48, 48, 52, 104, 0, 27, 91, 49, 59, 51, 69, 0, 27, 91, 49, 59, 52, 69, 0, 27, 91, 49, 59, 53, 69, 0, 27, 91, 49, 59, 54, 69, 0, 27, 91, 49, 59, 55, 69, 0, 27, 91, 51, 59, 51, 126, 0, 27, 91, 51, 59, 52, 126, 0, 27, 91, 51, 59, 53, 126, 0, 27, 91, 51, 59, 54, 126, 0, 27, 91, 51, 59, 55, 126, 0, 27, 91, 49, 59, 50, 66, 0, 27, 91, 49, 59, 51, 66, 0, 27, 91, 49, 59, 52, 66, 0, 27, 91, 49, 59, 53, 66, 0, 27, 91, 49, 59, 54, 66, 0, 27, 91, 49, 59, 55, 66, 0, 27, 91, 49, 59, 51, 70, 0, 27, 91, 49, 59, 52, 70, 0, 27, 91, 49, 59, 53, 70, 0, 27, 91, 49, 59, 54, 70, 0, 27, 91, 49, 59, 55, 70, 0, 27, 91, 49, 59, 51, 72, 0, 27, 91, 49, 59, 52, 72, 0, 27, 91, 49, 59, 53, 72, 0, 27, 91, 49, 59, 54, 72, 0, 27, 91, 49, 59, 55, 72, 0, 27, 91, 50, 59, 51, 126, 0, 27, 91, 50, 59, 52, 126, 0, 27, 91, 50, 59, 53, 126, 0, 27, 91, 50, 59, 54, 126, 0, 27, 91, 50, 59, 55, 126, 0, 27, 91, 49, 59, 51, 68, 0, 27, 91, 49, 59, 52, 68, 0, 27, 91, 49, 59, 53, 68, 0, 27, 91, 49, 59, 54, 68, 0, 27, 91, 49, 59, 55, 68, 0, 27, 91, 54, 59, 51, 126, 0, 27, 91, 54, 59, 52, 126, 0, 27, 91, 54, 59, 53, 126, 0, 27, 91, 54, 59, 54, 126, 0, 27, 91, 54, 59, 55, 126, 0, 27, 91, 53, 59, 51, 126, 0, 27, 91, 53, 59, 52, 126, 0, 27, 91, 53, 59, 53, 126, 0, 27, 91, 53, 59, 54, 126, 0, 27, 91, 53, 59, 55, 126, 0, 27, 91, 49, 59, 51, 67, 0, 27, 91, 49, 59, 52, 67, 0, 27, 91, 49, 59, 53, 67, 0, 27, 91, 49, 59, 54, 67, 0, 27, 91, 49, 59, 55, 67, 0, 27, 91, 49, 59, 50, 65, 0, 27, 91, 49, 59, 51, 65, 0, 27, 91, 49, 59, 52, 65, 0, 27, 91, 49, 59, 53, 65, 0, 27, 91, 49, 59, 54, 65, 0, 27, 91, 49, 59, 55, 65, 0, 27, 91, 73, 0, 27, 91, 79, 0, 27, 91, 50, 57, 109, 0, 27, 91, 52, 56, 58, 50, 58, 37, 112, 49, 37, 100, 58, 37, 112, 50, 37, 100, 58, 37, 112, 51, 37, 100, 109, 0, 27, 91, 51, 56, 58, 50, 58, 37, 112, 49, 37, 100, 58, 37, 112, 50, 37, 100, 58, 37, 112, 51, 37, 100, 109, 0, 27, 91, 57, 109, 0, 83, 117, 0, 84, 99, 0, 88, 70, 0, 102, 117, 108, 108, 107, 98, 100, 0, 66, 68, 0, 66, 69, 0, 67, 114, 0, 67, 115, 0, 77, 115, 0, 80, 69, 0, 80, 83, 0, 82, 86, 0, 83, 101, 0, 83, 101, 116, 117, 108, 99, 0, 83, 109, 117, 108, 120, 0, 83, 115, 0, 83, 121, 110, 99, 0, 88, 82, 0, 102, 100, 0, 102, 101, 0, 107, 66, 69, 71, 51, 0, 107, 66, 69, 71, 52, 0, 107, 66, 69, 71, 53, 0, 107, 66, 69, 71, 54, 0, 107, 66, 69, 71, 55, 0, 107, 68, 67, 51, 0, 107, 68, 67, 52, 0, 107, 68, 67, 53, 0, 107, 68, 67, 54, 0, 107, 68, 67, 55, 0, 107, 68, 78, 0, 107, 68, 78, 51, 0, 107, 68, 78, 52, 0, 107, 68, 78, 53, 0, 107, 68, 78, 54, 0, 107, 68, 78, 55, 0, 107, 69, 78, 68, 51, 0, 107, 69, 78, 68, 52, 0, 107, 69, 78, 68, 53, 0, 107, 69, 78, 68, 54, 0, 107, 69, 78, 68, 55, 0, 107, 72, 79, 77, 51, 0, 107, 72, 79, 77, 52, 0, 107, 72, 79, 77, 53, 0, 107, 72, 79, 77, 54, 0, 107, 72, 79, 77, 55, 0, 107, 73, 67, 51, 0, 107, 73, 67, 52, 0, 107, 73, 67, 53, 0, 107, 73, 67, 54, 0, 107, 73, 67, 55, 0, 107, 76, 70, 84, 51, 0, 107, 76, 70, 84, 52, 0, 107, 76, 70, 84, 53, 0, 107, 76, 70, 84, 54, 0, 107, 76, 70, 84, 55, 0, 107, 78, 88, 84, 51, 0, 107, 78, 88, 84, 52, 0, 107, 78, 88, 84, 53, 0, 107, 78, 88, 84, 54, 0, 107, 78, 88, 84, 55, 0, 107, 80, 82, 86, 51, 0, 107, 80, 82, 86, 52, 0, 107, 80, 82, 86, 53, 0, 107, 80, 82, 86, 54, 0, 107, 80, 82, 86, 55, 0, 107, 82, 73, 84, 51, 0, 107, 82, 73, 84, 52, 0, 107, 82, 73, 84, 53, 0, 107, 82, 73, 84, 54, 0, 107, 82, 73, 84, 55, 0, 107, 85, 80, 0, 107, 85, 80, 51, 0, 107, 85, 80, 52, 0, 107, 85, 80, 53, 0, 107, 85, 80, 54, 0, 107, 85, 80, 55, 0, 107, 120, 73, 78, 0, 107, 120, 79, 85, 84, 0, 114, 109, 120, 120, 0, 115, 101, 116, 114, 103, 98, 98, 0, 115, 101, 116, 114, 103, 98, 102, 0, 115, 109, 120, 120, 0, }; diff --git a/kitty/terminfo.py b/kitty/terminfo.py index 21c9b86c7..9d84b5913 100644 --- a/kitty/terminfo.py +++ b/kitty/terminfo.py @@ -34,6 +34,11 @@ termcap_aliases = { bool_capabilities = { # auto_right_margin (terminal has automatic margins) 'am', + # auto_left_margin (cursor wraps on CUB1 from 0 to last column on prev line). This prevents ncurses + # from using BS (backspace) to position the cursor. See https://github.com/kovidgoyal/kitty/issues/8841 + # It also allows using backspace with multi-line edits in cooked mode. Foot + # is the only other modern terminal I know of that implements this. + 'bw', # can_change (terminal can redefine existing colors) 'ccc', # has_meta key (i.e. sets the eight bit) @@ -69,6 +74,7 @@ bool_capabilities = { termcap_aliases.update({ 'am': 'am', + 'bw': 'bw', 'cc': 'ccc', 'km': 'km', '5i': 'mc5i', diff --git a/kitty/vt-parser.c b/kitty/vt-parser.c index 863a5a65c..3a18fbc80 100644 --- a/kitty/vt-parser.c +++ b/kitty/vt-parser.c @@ -1009,7 +1009,7 @@ parse_sgr(Screen *screen, const uint8_t *buf, unsigned int num, const char *repo static void screen_cursor_up2(Screen *s, unsigned int count) { screen_cursor_up(s, count, false, -1); } static void -screen_cursor_back1(Screen *s, unsigned int count) { screen_cursor_back(s, count, -1); } +screen_cursor_back1(Screen *s, unsigned int count) { screen_cursor_move(s, count, -1); } static void screen_tabn(Screen *s, unsigned int count) { for (index_type i=0; i < MAX(1u, count); i++) screen_tab(s); } diff --git a/kitty_tests/graphics.py b/kitty_tests/graphics.py index 6b16654fc..659d60197 100644 --- a/kitty_tests/graphics.py +++ b/kitty_tests/graphics.py @@ -766,7 +766,7 @@ class TestGraphics(BaseTest): s.draw("\U0010EEEE\u0305\u0305\U0010EEEE\u0305\u030D") # These two characters will be two separate refs (not contiguous). s.draw("\U0010EEEE\u0305\u0305\U0010EEEE\u0305\u030E") - s.cursor_back(4) + s.cursor_move(4) s.update_only_line_graphics_data() refs = layers(s) self.ae(len(refs), 3) @@ -786,7 +786,7 @@ class TestGraphics(BaseTest): # The second image, 2x1 s.apply_sgr("38;2;42;43;44") s.draw("\U0010EEEE\u0305\u030D\U0010EEEE\u0305\u030E") - s.cursor_back(2) + s.cursor_move(2) s.update_only_line_graphics_data() refs = layers(s) self.ae(len(refs), 2) @@ -804,7 +804,7 @@ class TestGraphics(BaseTest): s.draw("\U0010EEEE\u0305\u0305\U0010EEEE\u0305\U0010EEEE\U0010EEEE\u0305") # full row 1 of the first image s.draw("\U0010EEEE\u030D\U0010EEEE\U0010EEEE\U0010EEEE\u030D\u0310") - s.cursor_back(8) + s.cursor_move(8) s.update_only_line_graphics_data() refs = layers(s) self.ae(len(refs), 2) @@ -826,7 +826,7 @@ class TestGraphics(BaseTest): # This one will have id=43, which does not exist. s.apply_sgr("38;2;0;0;43") s.draw("\U0010EEEE\u0305\U0010EEEE\U0010EEEE\U0010EEEE") - s.cursor_back(4) + s.cursor_move(4) s.update_only_line_graphics_data() refs = layers(s) self.ae(len(refs), 0) @@ -842,7 +842,7 @@ class TestGraphics(BaseTest): s.draw("\U0010EEEE\u0305\u0305\u059C\U0010EEEE\u0305\u030D\u059C") # Check that we can continue by using implicit row/column specification. s.draw("\U0010EEEE\u0305\U0010EEEE") - s.cursor_back(6) + s.cursor_move(6) s.update_only_line_graphics_data() refs = layers(s) self.ae(len(refs), 2) @@ -856,7 +856,7 @@ class TestGraphics(BaseTest): s.draw("\U0010EEEE\u0305\u0305\u0305\U0010EEEE") s.apply_sgr("38;5;43") s.draw("\U0010EEEE\u0305\u0305\u059C\U0010EEEE\U0010EEEE\u0305\U0010EEEE") - s.cursor_back(6) + s.cursor_move(6) s.update_only_line_graphics_data() refs = layers(s) self.ae(len(refs), 2) diff --git a/kitty_tests/parser.py b/kitty_tests/parser.py index f6c395786..6fb5f3dc9 100644 --- a/kitty_tests/parser.py +++ b/kitty_tests/parser.py @@ -353,7 +353,7 @@ class TestParser(BaseTest): s = self.create_screen() pb = partial(self.parse_bytes_dump, s) pb('abcde', 'abcde') - s.cursor_back(5) + s.cursor_move(5) pb('x\033[2@y', 'x', ('screen_insert_characters', 2), 'y') self.ae(str(s.line(0)), 'xy bc') pb('x\033[2;7@y', 'x', ('CSI code @ has 2 > 1 parameters',), 'y') diff --git a/kitty_tests/screen.py b/kitty_tests/screen.py index fb0affac5..03ad0d43e 100644 --- a/kitty_tests/screen.py +++ b/kitty_tests/screen.py @@ -44,7 +44,7 @@ class TestScreen(BaseTest): s.reset(), s.reset_dirty() s.set_mode(IRM) s.draw('12345' * 5) - s.cursor_back(5) + s.cursor_move(5) self.ae(s.cursor.x, 0), self.ae(s.cursor.y, 4) s.reset_dirty() s.draw('ab') @@ -98,7 +98,7 @@ class TestScreen(BaseTest): s.set_mode(IRM) s.draw(text * 5) self.ae(str(s.line(0)), text) - s.cursor_back(5) + s.cursor_move(5) self.ae(s.cursor.x, 0), self.ae(s.cursor.y, 4) s.reset_dirty() s.draw('a\u0306b') @@ -162,7 +162,7 @@ class TestScreen(BaseTest): s.reset(), s.reset_dirty() s.draw('abcde') s.cursor.bold = True - s.cursor_back(4) + s.cursor_move(4) s.reset_dirty() self.ae(s.cursor.x, 1) @@ -170,11 +170,11 @@ class TestScreen(BaseTest): s.insert_characters(2) self.ae(str(s.line(0)), 'a bc') self.assertTrue(s.line(0).cursor_from(1).bold) - s.cursor_back(1) + s.cursor_move(1) s.insert_characters(20) self.ae(str(s.line(0)), '') s.draw('xココ') - s.cursor_back(5) + s.cursor_move(5) s.reset_dirty() s.insert_characters(1) self.ae(str(s.line(0)), ' xコ') @@ -270,7 +270,7 @@ class TestScreen(BaseTest): self.ae((s.cursor.x, s.cursor.y), (0, 1)) s.cursor_forward(3) self.ae((s.cursor.x, s.cursor.y), (3, 1)) - s.cursor_back() + s.cursor_move() self.ae((s.cursor.x, s.cursor.y), (2, 1)) s.cursor_down() self.ae((s.cursor.x, s.cursor.y), (2, 2)) @@ -534,6 +534,28 @@ class TestScreen(BaseTest): s.draw('aaaX\tbbbb') self.ae(str(s.line(0)) + str(s.line(1)), 'aaaXbbbb') + def test_backspace(self): + s = self.create_screen() + q = 'a'*s.columns + def backspace(use_bs=True): + if use_bs: # this is how the kernel implements backspace + s.draw('\x08 \x08') + else: + s.cursor_move(1) + s.draw(' ') + s.cursor_move(1) + for use_bs in (True, False): + s.reset() + s.draw(q) + s.draw('b') + backspace(use_bs) + self.ae(str(s.line(0)), q) + self.ae(str(s.line(1)), ' ') + self.ae(s.cursor.x, 0) + backspace(use_bs) + self.ae(str(s.line(0)), q[:-1] + ' ') + self.ae(str(s.line(1)), ' ') + def test_margins(self): # Taken from vttest/main.c s = self.create_screen(cols=80, lines=24) diff --git a/terminfo/kitty.termcap b/terminfo/kitty.termcap index 9a5e69ff8..facc3d4a7 100644 --- a/terminfo/kitty.termcap +++ b/terminfo/kitty.termcap @@ -1 +1 @@ -xterm-kitty|KovIdTTY:5i:NP:am:cc:hs:km:mi:ms:xn:Co#256:co#80:it#8:li#24:pa#32767:#2=\E[1;2H:#3=\E[2;2~:#4=\E[1;2D:%1=:%c=\E[6;2~:%e=\E[5;2~:%i=\E[1;2C:&8=:&9=\E[1;2E:*4=\E[3;2~:*7=\E[1;2F:@1=\EOE:@7=\EOF:AB=\E[48;5;%dm:AF=\E[38;5;%dm:AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:DO=\E[%dB:F1=\E[23~:F2=\E[24~:F3=\E[1;2P:F4=\E[1;2Q:F5=\E[13;2~:F6=\E[1;2S:F7=\E[15;2~:F8=\E[17;2~:F9=\E[18;2~:FA=\E[19;2~:FB=\E[20;2~:FC=\E[21;2~:FD=\E[23;2~:FE=\E[24;2~:FF=\E[1;5P:FG=\E[1;5Q:FH=\E[13;5~:FI=\E[1;5S:FJ=\E[15;5~:FK=\E[17;5~:FL=\E[18;5~:FM=\E[19;5~:FN=\E[20;5~:FO=\E[21;5~:FP=\E[23;5~:FQ=\E[24;5~:FR=\E[1;6P:FS=\E[1;6Q:FT=\E[13;6~:FU=\E[1;6S:FV=\E[15;6~:FW=\E[17;6~:FX=\E[18;6~:FY=\E[19;6~:FZ=\E[20;6~:Fa=\E[21;6~:Fb=\E[23;6~:Fc=\E[24;6~:Fd=\E[1;3P:Fe=\E[1;3Q:Ff=\E[13;3~:Fg=\E[1;3S:Fh=\E[15;3~:Fi=\E[17;3~:Fj=\E[18;3~:Fk=\E[19;3~:Fl=\E[20;3~:Fm=\E[21;3~:Fn=\E[23;3~:Fo=\E[24;3~:Fp=\E[1;4P:Fq=\E[1;4Q:Fr=\E[13;4~:IC=\E[%d@:..Ic=\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\:K1=:K3=:K4=:K5=:Km=\E[M:LE=\E[%dD:RA=\E[?7l:RI=\E[%dC:SA=\E[?7h:SF=\E[%dS:SR=\E[%dT:UP=\E[%dA:ZH=\E[3m:ZR=\E[23m:ac=++,,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~:ae=\E(B:al=\E[L:as=\E(0:bl=^G:bt=\E[Z:cb=\E[1K:cd=\E[J:ce=\E[K:ch=\E[%i%dG:cl=\E[H\E[2J:cm=\E[%i%d;%dH:cr=\r:cs=\E[%i%d;%dr:ct=\E[3g:cv=\E[%i%dd:dc=\E[P:dl=\E[M:do=\n:ds=\E]2;\E\\:ec=\E[%dX:ei=\E[4l:fs=^G:ho=\E[H:im=\E[4h:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\E[15~:k6=\E[17~:k7=\E[18~:k8=\E[19~:k9=\E[20~:k;=\E[21~:kB=\E[Z:kD=\E[3~:kF=\E[1;2B:kI=\E[2~:kN=\E[6~:kP=\E[5~:kR=\E[1;2A:kb=\177:kd=\EOB:ke=\E[?1l:kh=\EOH:kl=\EOD:kr=\EOC:ks=\E[?1h:ku=\EOA:le=^H:md=\E[1m:me=\E[0m:mh=\E[2m:mr=\E[7m:nd=\E[C:oc=\E]104\007:op=\E[39;49m:r1=\E]\E\\\Ec:rc=\E8:..rp=%p1%c\E[%p2%{1}%-%db:..sa=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m:sc=\E7:se=\E[27m:sf=\n:so=\E[7m:sr=\EM:st=\EH:ta=^I:te=\E[?1049l:ti=\E[?1049h:ts=\E]2;:u6=\E[%i%d;%dR:u7=\E[6n:..u8=\E[?%[;0123456789]c:u9=\E[c:ue=\E[24m:up=\E[A:us=\E[4m:vb=\E[?5h\E[?5l:ve=\E[?12h\E[?25h:vi=\E[?25l:vs=\E[?12;25h: \ No newline at end of file +xterm-kitty|KovIdTTY:5i:NP:am:bw:cc:hs:km:mi:ms:xn:Co#256:co#80:it#8:li#24:pa#32767:#2=\E[1;2H:#3=\E[2;2~:#4=\E[1;2D:%1=:%c=\E[6;2~:%e=\E[5;2~:%i=\E[1;2C:&8=:&9=\E[1;2E:*4=\E[3;2~:*7=\E[1;2F:@1=\EOE:@7=\EOF:AB=\E[48;5;%dm:AF=\E[38;5;%dm:AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:DO=\E[%dB:F1=\E[23~:F2=\E[24~:F3=\E[1;2P:F4=\E[1;2Q:F5=\E[13;2~:F6=\E[1;2S:F7=\E[15;2~:F8=\E[17;2~:F9=\E[18;2~:FA=\E[19;2~:FB=\E[20;2~:FC=\E[21;2~:FD=\E[23;2~:FE=\E[24;2~:FF=\E[1;5P:FG=\E[1;5Q:FH=\E[13;5~:FI=\E[1;5S:FJ=\E[15;5~:FK=\E[17;5~:FL=\E[18;5~:FM=\E[19;5~:FN=\E[20;5~:FO=\E[21;5~:FP=\E[23;5~:FQ=\E[24;5~:FR=\E[1;6P:FS=\E[1;6Q:FT=\E[13;6~:FU=\E[1;6S:FV=\E[15;6~:FW=\E[17;6~:FX=\E[18;6~:FY=\E[19;6~:FZ=\E[20;6~:Fa=\E[21;6~:Fb=\E[23;6~:Fc=\E[24;6~:Fd=\E[1;3P:Fe=\E[1;3Q:Ff=\E[13;3~:Fg=\E[1;3S:Fh=\E[15;3~:Fi=\E[17;3~:Fj=\E[18;3~:Fk=\E[19;3~:Fl=\E[20;3~:Fm=\E[21;3~:Fn=\E[23;3~:Fo=\E[24;3~:Fp=\E[1;4P:Fq=\E[1;4Q:Fr=\E[13;4~:IC=\E[%d@:..Ic=\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\:K1=:K3=:K4=:K5=:Km=\E[M:LE=\E[%dD:RA=\E[?7l:RI=\E[%dC:SA=\E[?7h:SF=\E[%dS:SR=\E[%dT:UP=\E[%dA:ZH=\E[3m:ZR=\E[23m:ac=++,,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~:ae=\E(B:al=\E[L:as=\E(0:bl=^G:bt=\E[Z:cb=\E[1K:cd=\E[J:ce=\E[K:ch=\E[%i%dG:cl=\E[H\E[2J:cm=\E[%i%d;%dH:cr=\r:cs=\E[%i%d;%dr:ct=\E[3g:cv=\E[%i%dd:dc=\E[P:dl=\E[M:do=\n:ds=\E]2;\E\\:ec=\E[%dX:ei=\E[4l:fs=^G:ho=\E[H:im=\E[4h:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\E[15~:k6=\E[17~:k7=\E[18~:k8=\E[19~:k9=\E[20~:k;=\E[21~:kB=\E[Z:kD=\E[3~:kF=\E[1;2B:kI=\E[2~:kN=\E[6~:kP=\E[5~:kR=\E[1;2A:kb=\177:kd=\EOB:ke=\E[?1l:kh=\EOH:kl=\EOD:kr=\EOC:ks=\E[?1h:ku=\EOA:le=^H:md=\E[1m:me=\E[0m:mh=\E[2m:mr=\E[7m:nd=\E[C:oc=\E]104\007:op=\E[39;49m:r1=\E]\E\\\Ec:rc=\E8:..rp=%p1%c\E[%p2%{1}%-%db:..sa=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m:sc=\E7:se=\E[27m:sf=\n:so=\E[7m:sr=\EM:st=\EH:ta=^I:te=\E[?1049l:ti=\E[?1049h:ts=\E]2;:u6=\E[%i%d;%dR:u7=\E[6n:..u8=\E[?%[;0123456789]c:u9=\E[c:ue=\E[24m:up=\E[A:us=\E[4m:vb=\E[?5h\E[?5l:ve=\E[?12h\E[?25h:vi=\E[?25l:vs=\E[?12;25h: \ No newline at end of file diff --git a/terminfo/kitty.terminfo b/terminfo/kitty.terminfo index 317451ec7..8b0a9cb0d 100644 --- a/terminfo/kitty.terminfo +++ b/terminfo/kitty.terminfo @@ -3,6 +3,7 @@ xterm-kitty|KovIdTTY, Tc, XF, am, + bw, ccc, fullkbd, hs, diff --git a/terminfo/x/xterm-kitty b/terminfo/x/xterm-kitty index d8eaab6e96e9c3460b98635928bd2dedb62cdb00..90c9ee0a8e4638af2d6ed130bcaf88ca3baee40c 100644 GIT binary patch delta 12 Tcmew_^Iv9yA|vBQrC2@yA&LYj delta 12 Tcmew_^Iv9yA|t~_rC2@yA%z4d