Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Patch 8.0.0754 (commit eeac677) breaks bold colours on xterm t_Co=8 #1901

@koitsu

Description

@koitsu

Potentially involved commits:

eeac677 (8.0.0754)
b41bf8e (8.0.0791)

I recent upgraded my FreeBSD 10.3 vim-lite package from 8.0.0742 to 8.0.0809 and was surprised to find that colours looked incorrect -- specifically, they were darker (i.e. bold bit no longer being set on terminal output).

FreeBSD's TERM=xterm uses t_Co=8 and has for decades. The terminal truly only supports 8 colours, but in the terminal emulator (PuTTY), bold being set causes the colours to be brighter. This behaviour is "ANSI-like" (where bold means "brighter colour" rather than a bolded font) and is extremely common.

I do not use t_Co=256 because the colours look weird to me ("washed out", purely an aesthetic dislike), and I do not use TERM=xterm-color (which uses t_Co=256 anyway) because not all *IX software works correctly with xterm-color.

Attached are screenshots of FreeBSD 10.3 vim-lite 8.0.0809 vs. FreeBSD 9.3 vim-lite 8.0.0134. There are irrelevant termcap differences (I reviewed them), but visually you can see the difference I'm referring to (re: lack of bold). FreeBSD binary package updates do not have have a native way to revert to a previous package, so I cannot roll back to 8.0.0742.

Crummy workaround, which may or not be accurate (can't tell if 0754 or 0791 is responsible):

if has("patch-8.0.0754") && &term =~ "xterm"
  set t_Co=16
endif

with_patch
without_patch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions