Closed stefanhaller closed 1 week ago
Coverage variation | Diff coverage |
---|---|
Report missing for 3af545daf7cf6458e8efd324012047ce688f08e6[^1] | :white_check_mark: 97.53% |
:rocket: Don’t miss a bit, follow what’s new on Codacy.
Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more [^1]: Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.
Great work! Two things from testing it locally: 1) If I open lazygit and go straight to searching the commits view and typing in my search value I sometimes (50% of the time) end up with 'no matches shown' where my cursor is, before I've pressed enter.
2) What are your thoughts on greying out the non-matched lines to better highlight the matching lines?
I've got a hacky commit to implement that. Let me know if you'd like to see it
- If I open lazygit and go straight to searching the commits view and typing in my search value I sometimes (50% of the time) end up with 'no matches shown' where my cursor is, before I've pressed enter.
That's because of the newly added ReapplySearch that we do every time the model changes. I was simply calling Search again there, which is not a good idea; I had to split this up into two separate functions. See 3da6594a433e and d04cb9a7c583. It's probably easier to review after squashing the fixups, let me know if you want me to do that now.
- What are your thoughts on greying out the non-matched lines to better highlight the matching lines? I've got a hacky commit to implement that. Let me know if you'd like to see it
I like the idea, and would be interested to see your commit. It sounds unrelated to this PR though, I think we should do that separately afterwards.
This makes it possible to search the model data instead of the view when pressing
/
, and uses this for the commits view.This is mainly a preparation for #2533 which requires it, but it is also useful on its own, because it makes it possible to search for full commit hashes. It will highlight the abbreviated hash in that case.
Please check if the PR fulfills these requirements
[x] Cheatsheets are up-to-date (run
go generate ./...
)[x] Code has been formatted (see here)
[ ] Tests have been added/updated (see here for the integration test guide)
[ ] Text is internationalised (see here)
[ ] Docs have been updated if necessary
[x] You've read through your own file changes for silly mistakes etc