martanne / vis

A vi-like editor based on Plan 9's structural regular expressions
Other
4.19k stars 260 forks source link

Cells styled with dim have strange colours #1157

Open sansfontieres opened 6 months ago

sansfontieres commented 6 months ago

Following this conversation:

I get this funny outcome since this commit.

image

EDIT: I see, it seems to take the colour of vis.lexers.STYLE_LINENUMBER_CURSOR

Originally posted by @sansfontieres in https://github.com/martanne/vis/issues/970#issuecomment-1838386771

; vis -v
vis v0.7-147-gf1abd79 +curses +lua

The original conversation had a screenshot on tmux, but the issue was observed on iTerm2 without any other terminal emulator over it. iTerm2 is set with $TERM=xterm-256color, tmux (3.3a) with $TERM=tmux-256color (but tmux-256color have other colours issues)

The issue was observed with ncursesw, not the old ncurses shipped with macOS.

; ./configure
[...]
checking for ncursesw... yes
[...]
; pkg-config --cflags ncursesw
-D_DARWIN_C_SOURCE -DNCURSES_WIDECHAR -I/opt/local/include

After applying #1154 (as 9dcda8d6e29741ac57ed353172f681f7dae0c1d8), the issue still persists.

I also observed that dimmed cells are not dimmed on Ghostty (only on vis afaik), but that's another issue on a terminal emulator in beta. I’ll keep an eye, though.

image
sansfontieres commented 6 months ago

It crosses the splits too

image

Lemme know if something else can help you, like an asciinema recording or whatnot 😁

mcepl commented 6 months ago

Looking at https://github.com/nc0fr/homebrew-nc0/issues/3 … is this the build you use? Do you use any patches from https://github.com/martanne/vis/wiki/Patches (those are horribly unmaintained and somebody should take a look at them and either include them or throw them away)?

sansfontieres commented 6 months ago

I built directly from source (2 commits late), without patch (except #1154).

I also built vis without curses, to be sure, same issue.