vis icon indicating copy to clipboard operation
vis copied to clipboard

Use `STYLE_WHITESPACE` for spaces, newlines, and tabs

Open lfdebrux opened this issue 4 months ago • 6 comments

I wanted to be able to change the colour of the replacement characters shown for showspaces, showtabs, and/or shownewlines, and was expecting STYLE_WHITESPACE to do this, but that didn't have any effect...

Issue #1198 suggested STYLE_WHITESPACE wasn't being used for anything, and I couldn't see it being used in any of the lexers that comes with vis, so this PR adds some lines to style the cells used for the replacement characters with the style in STYLE_WHITESPACE.

lfdebrux avatar Sep 19 '25 07:09 lfdebrux

Looks good to me.

ninewise avatar Sep 22 '25 06:09 ninewise

When testing this PR, tests started to freeze and I have to killall vis to make each step to continue (and FAIL obviously). I have put my lame attempt to fix together with your commit to https://git.sr.ht/~mcepl/vis/log/1266_STYLE_WHITESPACE , but I am not sure how to proceed.

mcepl avatar Nov 16 '25 23:11 mcepl

@mcepl thanks for testing this PR! That's strange that they started to freeze... I tried to reproduce that but have only managed to do so on your branch, which looks to have some extra commits that aren't in the repo on GitHub?

lfdebrux avatar Nov 17 '25 10:11 lfdebrux

I have no idea, yes, it is possible that it may be an interaction with some other commits on my main branch (BTW, see my email to the list on my further strategy; the failures with your patch are without regards to the mentioned patches, it failed even before that branch is applied). So far, I put that branch with you commit to the side and I am waiting whether you have some ideas how to fix it.

mcepl avatar Nov 17 '25 12:11 mcepl

@mcepl ah, I see, you're creating a fork on sourcehut. I think in that case it makes most sense to keep the commits in this branch as they are and submit a different patch for your fork; I can put one together. Good luck with your fork!

lfdebrux avatar Nov 18 '25 06:11 lfdebrux

Testing as https://git.sr.ht/~mcepl/vis/commit/92168264

mcepl avatar Nov 18 '25 19:11 mcepl

I was not able to recreate any such freeze in my testing so I've merged. Thanks for the patch!

rnpnr avatar Dec 14 '25 13:12 rnpnr