diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-05-09 09:57:19 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-05-09 09:57:19 +0000 |
| commit | 8448296bb3c0fa96f5af5cb7ec563bb0c7e99093 (patch) | |
| tree | 62e9d97600c9e636dc5be60b81c4820d3b0ac43d /terminal.c | |
| parent | completions: zsh: complete command/shell, and its arguments (diff) | |
term: print: line-wrap multi-column characters instead of cutting them in half
Diffstat (limited to 'terminal.c')
| -rw-r--r-- | terminal.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -2284,9 +2284,11 @@ term_disable_app_sync_updates(struct terminal *term) } static inline void -print_linewrap(struct terminal *term) +print_linewrap(struct terminal *term, int width) { - if (likely(!term->grid->cursor.lcf)) { + if (likely(!(term->grid->cursor.lcf || + term->grid->cursor.point.col + width > term->cols))) + { /* Not and end of line */ return; } @@ -2329,7 +2331,7 @@ term_print(struct terminal *term, wchar_t wc, int width) if (unlikely(width <= 0)) return; - print_linewrap(term); + print_linewrap(term, width); print_insert(term, width); sixel_delete_at_cursor(term); |
