Skip to content
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

Result is incorrect or no highlighting when search with regular expression. #1000

Closed
GrandZhuo opened this issue Mar 25, 2020 · 1 comment
Closed
Assignees

Comments

@GrandZhuo
Copy link

GrandZhuo commented Mar 25, 2020

I use vim a lot, so I am very accustomed to using regular expressions for searching. But I found that sometimes search results are wrong or no highlighting .

For example, I use '/m$' to find lines that end with m, but the search results are completely wrong. If I use '/mm$', it can search for the correct result but without highlighting.

It seems that as long as I use '$' to match line ending, the search results are not highlighted.

The above results are tested in my project, I'm not sure what it looks like in your project

tig version 2.5.0
ncurses version 5.7.20081102
readline version 8.0

@GrandZhuo GrandZhuo changed the title regexp Result is incorrect or no highlighting when search with regular expression. Mar 25, 2020
@koutcher
Copy link
Collaborator

koutcher commented Apr 5, 2020

The problem with $ is due to search highlighting being done directly on a copy of screen buffer, so all lines are padded with spaces to screen width. There is no perfect solution but maybe trimming spaces would be a good compromise.

@koutcher koutcher self-assigned this Apr 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants