git.y1.nz

mtm

Ncurses-based terminal multiplexer
download: https://git.y1.nz/archives/mtm.tar.gz
Files | Log | Refs

commit 5af7eb613d72714441e33ffe47bcfdb66d6d20de
parent c869a45f154f23e3498341cbd0640b0ad73a2e37
Author: Rob King <jking@deadpixi.com>
Date:   Thu, 20 Apr 2017 11:34:49 -0500

Better handle combining and double-width characters.

Diffstat:
MMakefile2+-
Mmtm.c2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,6 +1,6 @@ CC := gcc CFLAGS ?= -O3 -std=c99 -Wall -Wextra -pedantic -FEATURES ?= -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE_EXTENDED +FEATURES ?= -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED HEADERS ?= LIBPATH ?= DESTDIR ?= /usr/local diff --git a/mtm.c b/mtm.c @@ -638,7 +638,7 @@ HANDLER(print) /* Print a character to the terminal */ } n->gc(n->win, w); - if (wmove(win, y, x + 1) == ERR) + if (wmove(win, y, x + wcwidth(w)) == ERR) n->xenl = true; n->repc = w;

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.