From d1191d380dd7850b0ca941e56515ed3f565f8e45 Mon Sep 17 00:00:00 2001 From: Dominik Vogt Date: Mon, 7 Apr 2008 22:15:03 +0200 Subject: [PATCH] Add line-graphics option to disable graphics characters for line drawing Signed-off-by: Jonas Fonseca --- tig.c | 8 +++++++- tigrc.5.txt | 5 +++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/tig.c b/tig.c index 9d0dca1..cdf3cd7 100644 --- a/tig.c +++ b/tig.c @@ -438,6 +438,7 @@ static const char usage[] = static bool opt_date = TRUE; static bool opt_author = TRUE; static bool opt_line_number = FALSE; +static bool opt_line_graphics = TRUE; static bool opt_rev_graph = FALSE; static bool opt_show_refs = TRUE; static int opt_num_interval = NUMBER_INTERVAL; @@ -1127,6 +1128,11 @@ option_set_command(int argc, char *argv[]) return OK; } + if (!strcmp(argv[0], "line-graphics")) { + opt_line_graphics = parse_bool(argv[2]); + return OK; + } + if (!strcmp(argv[0], "line-number-interval")) { opt_num_interval = atoi(argv[2]); return OK; @@ -1515,7 +1521,7 @@ draw_lineno(struct view *view, unsigned int lineno, int max, bool selected) if (col < max) { if (!selected) wattrset(view->win, A_NORMAL); - waddch(view->win, ACS_VLINE); + waddch(view->win, opt_line_graphics ? ACS_VLINE : '|'); col++; } if (col < max) { diff --git a/tigrc.5.txt b/tigrc.5.txt index bccb304..5e204f3 100644 --- a/tigrc.5.txt +++ b/tigrc.5.txt @@ -47,6 +47,7 @@ set show-date = yes # Show commit date? set show-rev-graph = yes # Show revision graph? set show-refs = yes # Show references? set show-line-numbers = no # Show line numbers? +set line-graphics = no # Disable graphics characters set line-number-interval = 5 # Interval between line numbers set tab-size = 8 # Number of spaces per tab set encoding = "UTF-8" # Commit encoding @@ -81,6 +82,10 @@ The following variables can be set: (branches, tags, and remotes) in the main view on start-up. Can all be toggled. +'line-graphics' (bool):: + + Whether to use graphic characters for line drawing. + 'line-number-interval' (int):: Interval between line numbers. Note, you have to toggle on line -- 2.32.0.93.g670b81a890