-
Notifications
You must be signed in to change notification settings - Fork 614
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vertical window separator renders as "x" in Putty, but the graph is OK #981
Comments
It turns Here's a quick and dirty fix that makes UTF-8 mode work like the ASCII mode: diff --git a/src/display.c b/src/display.c
index a23d41a..028bcc9 100644
--- a/src/display.c
+++ b/src/display.c
@@ -187,7 +187,7 @@ static void
redraw_display_separator(bool clear)
{
if (display_sep) {
- chtype separator = opt_line_graphics ? ACS_VLINE : '|';
+ chtype separator = (opt_line_graphics == GRAPHIC_DEFAULT) ? ACS_VLINE : '|';
if (clear)
wclear(display_sep);
diff --git a/src/draw.c b/src/draw.c
index e5b651f..92af79c 100644
--- a/src/draw.c
+++ b/src/draw.c
@@ -314,7 +314,7 @@ draw_lineno_custom(struct view *view, struct view_column *column, unsigned int l
unsigned long digits3 = MIN(9,MAX(3,column->width));
int max = MIN(VIEW_MAX_LEN(view), digits3);
char *text = NULL;
- chtype separator = opt_line_graphics ? ACS_VLINE : '|';
+ chtype separator = (opt_line_graphics == GRAPHIC_DEFAULT) ? ACS_VLINE : '|';
struct line_number_options *opts = &column->opt.line_number;
int interval = opts->interval > 0 ? opts->interval : 5; The proper fix would need to use the UTF-8 vertical bar in the UTF-8 mode, but the code would need to use strings instead of single characters for the separators. Also, using The Linux version of Putty exhibits the issue just like the Windows version, so Windows is not needed to work on this issue. |
There is a known issue with PuTTY when trying to mix PuTTY, UTF-8 and ncurses. It was fixed in PuTTY 0.71, but you need to select option |
@koutcher Thank you, that's explain exactly what's going on! That option fixes the ugly tree display in the |
Putty doesn't show VT100 line drawing characters in UTF-8 mode by default. Use Unicode drawing characters in UTF-8 mode for the vertical display separator and the line number separator. Closes jonas#981
Putty doesn't show VT100 line drawing characters in UTF-8 mode by default. Use Unicode drawing characters in UTF-8 mode for the vertical display separator and the line number separator. Closes jonas#981
Putty doesn't show VT100 line drawing characters in UTF-8 mode by default. Use Unicode drawing characters in UTF-8 mode for the vertical display separator and the line number separator. Closes jonas#981
Putty doesn't show VT100 line drawing characters in UTF-8 mode by default. Use Unicode drawing characters in UTF-8 mode for the vertical display separator and the line number separator. Closes jonas#981
Use the UTF-8 vertical line character in the UTF-8 mode. Putty doesn't show VT100 line drawing characters in the UTF-8 mode by default. Putty 0.70 and older doesn't even have that option. For the vertical display separator, use space as background in the UTF-8 mode, then output the vertical line character on every line. For the line number separator, imitate the graph drawing code. Use draw_graphic() in the DEFAULT mode only, draw_chars() otherwise. Closes jonas#981
Putty doesn't show VT100 line drawing characters in the UTF-8 mode by default. Putty 0.70 and older doesn't even have that option. For the vertical display separator, output the vertical line character on every line. For the line number separator, use code similar to the graph drawing code. Use draw_graphic() in the DEFAULT mode only, draw_chars() otherwise. Closes jonas#981
Putty doesn't show VT100 line drawing characters in the UTF-8 mode by default. Putty 0.70 and older doesn't even have that option. For the vertical display separator, use '|' as background, then output the vertical line character on every line. For the line number separator, use draw_graphic() in the default mode only. Use draw_chars() in the ASCII and UTF-8 modes. Add a test for vertical lines. The display separator is always captured as a line of '|' characters. The line number separators are captured correctly. 'x' corresponds to ACS_VLINE. Closes jonas#981
Putty doesn't show VT100 line drawing characters in the UTF-8 mode by default. Putty 0.70 and older doesn't even have that option. For the vertical display separator, output the vertical line character on every line. Use wbkgdset() instead of wbkgd() as the code takes care of setting the window contents. For the line number separator, use draw_graphic() in the default mode only. Use draw_chars() in the ASCII and UTF-8 modes. Add a test for vertical lines. The display separator is always captured as a line of '|' characters. The line number separators are captured correctly. 'x' corresponds to ACS_VLINE. Closes jonas#981
I believe I have a good fix for the issue. No workarounds should be necessary anymore. Can someone take a look at #983 please? |
Putty doesn't show VT100 line drawing characters in the UTF-8 mode by default. Putty 0.70 and older doesn't even have that option. For the vertical display separator, output the vertical line character on every line. Use wbkgdset() instead of wbkgd() as the code takes care of setting the window contents. For the line number separator, use draw_graphic() in the default mode only. Use draw_chars() in the ASCII and UTF-8 modes. Add a test for vertical lines. The display separator is always captured as a line of '|' characters. The line number separators are captured correctly. 'x' corresponds to ACS_VLINE. Closes #981
When run inside Putty, tig renders the vertical window separator in putty using
x
characters. However, the version graph uses correct vertical lines.Observed with different fonts: Consolas, DejaVu Sans Mono, Fira Mono, Fixedsys, Inconsolata, Lucida Console, Lucida Sans Typewriter. Observed with putty 0.70 and 0.73. Tig 2.4.1 and the current git versions are affected:
The system running Putty is Windows 10, the system running tig is Ubuntu 14.04.
The described behavior corresponds to
diff-view-line-graphics = utf-8
. If it'sascii
, the vertical bar is rendered using|
, but the graph becomes less pretty. Fordefault
,x
is used for the vertical bar, and the graph looks even worse than in theascii
mode. The graph is rendered using letters that don't even look like lines.I suspect that the vertical window separator is rendered using the
default
mode even though theutf-8
mode is in effect. Apparently, putty has an issue withdiff-view-line-graphics = default
.I would consider this issue resolved if the window separator renders in the
utf-8
mode correctly.The text was updated successfully, but these errors were encountered: