Try to guess if the window is UTF-8 by outputting a three-byte UTF-8 wide character and seeing how much the cursor moves. Currently tries to figure out if this works by some stupid checks on the terminal, these need to be rethought. Also might be better using a width 1 character rather than width 2.

This commit is contained in:
Nicholas Marriott
2009-05-19 16:08:35 +00:00
parent 5db59a0d20
commit 6db7bd6791
4 changed files with 102 additions and 8 deletions

3
tmux.h
View File

@ -1,4 +1,4 @@
/* $Id: tmux.h,v 1.324 2009-05-19 13:32:55 tcunha Exp $ */
/* $Id: tmux.h,v 1.325 2009-05-19 16:08:35 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -1117,6 +1117,7 @@ void tty_putc(struct tty *, u_char);
void tty_init(struct tty *, char *, char *);
void tty_start_tty(struct tty *);
void tty_stop_tty(struct tty *);
void tty_detect_utf8(struct tty *);
void tty_set_title(struct tty *, const char *);
void tty_update_mode(struct tty *, int);
void tty_draw_line(