less icon indicating copy to clipboard operation
less copied to clipboard

Contiguously coloured field disappears when finding the last character that ends a corlorised field.

Open Ma-XX-oN opened this issue 2 years ago • 5 comments

For the following command:

echo Hello there | grep --color=always Hello | less -R

If you were to search for the letter 'o', the word 'Hello' disappears. This happens when a search finds the end of any contagiously coloured field. I.e. 'lo', 'llo', 'ello', 'Hello' all cause 'Hello' to disappear.

Ma-XX-oN avatar May 16 '22 18:05 Ma-XX-oN

I believe this was fixed in less-596. Can you try the current beta (less-603) and see if you still see the bug?

gwsw avatar May 16 '22 18:05 gwsw

Oh, and are you guys supporting searching across colour field boundaries? Because it kinda works, but does some messed up stuff.

Ma-XX-oN avatar May 17 '22 19:05 Ma-XX-oN

Tried to build, but sh configure --with-regex=none failed because it couldn't find the terminal libraries. I dled the latest ncurses lib using the pacman -S mingw-w64-i686-ncurses command (I'm using MSYS2) but it didn't work. Also tried pacman -S ncurses with no joy. Any ideas?

checking for working terminal libraries... Cannot find terminal libraries - configure failed

EDIT: Hmm, needed to install ncurses-devel, and the configure script worked. Doh!

Ma-XX-oN avatar May 17 '22 20:05 Ma-XX-oN

Well it does work better. However, I noticed that the inverted highlight box has only the colour of where the selection started. My command:

echo Why hello there | grep --color=always hello | ./less -R

Select y he will show the selected as black on white: image

Where as sellect llo th will show the selected as black on red: image

I would have expected it to just invert the colours of each character the selection was applied to, or perhaps another colour entirely (selection colour). I wouldn't have expected it to change based on where the selection started though.

However, this is definitely an improvement. Thx.

Ma-XX-oN avatar May 18 '22 14:05 Ma-XX-oN

@Ma-XX-oN This last issue should be fixed in less-608 (c7ed204446892814c3db47d3cfabc598371700f6). Let me know if you see any more problems.

gwsw avatar Jul 22 '22 19:07 gwsw

I think this same issue is the one I faced lately:

https://lists.gnu.org/archive/html/groff/2022-08/msg00116.html https://lists.gnu.org/archive/html/groff/2022-08/msg00116.html

I compiled less 608 from source, and I can't reproduce my issue anymore.

alejandro-colomar avatar Aug 17 '22 12:08 alejandro-colomar

@Ma-XX-oN This last issue should be fixed in less-608 (c7ed204). Let me know if you see any more problems.

Sorry, didn't see this. Yes it appears to be fixed. Thx.

Ma-XX-oN avatar Aug 26 '22 17:08 Ma-XX-oN