From 963c238ff8d3f734bd852669d379e951f4fc7649 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Tue, 31 Jan 2017 09:10:07 +0100 Subject: vis: add workaround for broken color handling in Terminal.app Terminal.app sets $TERM=xterm-256color and ships a corresponding terminfo description advocating that it is capable of color changes to the 256 color palette when in fact it can not. We introduce a new boolean option "change-256colors" which is true by default but can be used to disable color changes. It is automatically set if Terminal.app is detected using $TERM_PROGRAM. This should fix display artifacts as described in #456. --- vis-core.h | 1 + 1 file changed, 1 insertion(+) (limited to 'vis-core.h') diff --git a/vis-core.h b/vis-core.h index cc8636d..66c71c4 100644 --- a/vis-core.h +++ b/vis-core.h @@ -168,6 +168,7 @@ struct Vis { int tabwidth; /* how many spaces should be used to display a tab */ bool expandtab; /* whether typed tabs should be converted to spaces */ bool autoindent; /* whether indentation should be copied from previous line on newline */ + bool change_colors; /* whether to adjust 256 color palette for true colors */ char *shell; /* shell used to launch external commands */ Map *cmds; /* ":"-commands, used for unique prefix queries */ Map *usercmds; /* user registered ":"-commands */ -- cgit v1.2.3