diff --git a/kitty/line.h b/kitty/line.h index 7ca36f2c65..580f521f39 100644 --- a/kitty/line.h +++ b/kitty/line.h @@ -9,14 +9,10 @@ #include "text-cache.h" -// TODO: Test multiple OS windows with decorations also with changing font size and test on macOS and Linux for re-alloc -// TODO: Test handling of calt ligatures with scale see is_group_calt_ligature() // TODO: Handle selection with multicell // TODO: URL detection with multicell -// TODO: Wrapping of multicell draw commands // TODO: Handle rewrap and restitch of multiline chars // TODO: Handle rewrap when a character is too wide/tall to fit on resized screen -// TODO: Implement baseline align for box drawing typedef union CellAttrs { struct { diff --git a/kitty/screen.c b/kitty/screen.c index ca81516763..a1e10e57d2 100644 --- a/kitty/screen.c +++ b/kitty/screen.c @@ -849,8 +849,7 @@ move_cursor_past_multicell(Screen *self, index_type required_width) { self->cursor->x++; } if (self->modes.mDECAWM || has_multiline_cells_in_span(cp, self->columns - required_width, required_width)) { - self->cursor->x = 0; - screen_index(self); + continue_to_next_line(self); } else { self->cursor->x = self->columns - required_width; if (cp[self->cursor->x].is_multicell) nuke_multicell_char_at(self, self->cursor->x, self->cursor->y, cp[self->cursor->x].x != 0); diff --git a/kitty_tests/multicell.py b/kitty_tests/multicell.py index 0817a4ef9a..58200b22c6 100644 --- a/kitty_tests/multicell.py +++ b/kitty_tests/multicell.py @@ -53,6 +53,7 @@ def ae(key): ae('vertical_align') ae('text') ae('natural_width') + ae('next_char_was_wrapped') if 'cursor' in assertions: self.ae(assertions['cursor'], (s.cursor.x, s.cursor.y), msg) @@ -127,9 +128,13 @@ def comb(x, y): # Test wrapping s.reset() + s.draw('x' * (s.columns - 1)) + multicell(s, 'a', scale=2) + ac(s.columns - 1, 0, is_multicell=False, text='', next_char_was_wrapped=True) + s.reset() multicell(s, 'a', scale=2) s.draw('x' * s.columns) - ac(s.cursor.x-1, s.cursor.y, is_multicell=False, text='x') + ac(s.cursor.x-1, s.cursor.y, is_multicell=False, text='x', next_char_was_wrapped=False) ac(0, 0, is_multicell=True, text='a') ac(0, 1, is_multicell=True, text='', y=1)