fix: insert r_padding within final highlight #1368
Open
+7
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When a component ends with a custom highlight, any
r_padding
should be added inside that highlight, not after, just like howl_padding
is added inside a custom starting highlight. This PR takes care of that.This is required to fully address folke/trouble.nvim#569 (see also folke/trouble.nvim#616 for the fix to trouble.nvim's own part in the issue).
Before:
![Screen Shot 2025-01-16 at 16 53 11 PM](https://private-user-images.githubusercontent.com/5809017/404087752-c576c962-f3d2-4500-8def-123228b79391.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1ODkwNDksIm5iZiI6MTczOTU4ODc0OSwicGF0aCI6Ii81ODA5MDE3LzQwNDA4Nzc1Mi1jNTc2Yzk2Mi1mM2QyLTQ1MDAtOGRlZi0xMjMyMjhiNzkzOTEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTVUMDMwNTQ5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YjA3OGQ4ZDYxMjAwYWVhM2JlNDMzYjE2NTYyODY4YThhNDkyM2NlYWM2NmJjN2IxZWMwMmYxNTA4NmZlYzgwNSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.KpBh4yxDfr7BC266ajjdk_phCVNggPLCH5I7CE35HPw)
After:
![Screen Shot 2025-01-16 at 17 18 20 PM](https://private-user-images.githubusercontent.com/5809017/404087598-8f8179d1-a444-428d-8b30-34bba96dec45.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1ODkwNDksIm5iZiI6MTczOTU4ODc0OSwicGF0aCI6Ii81ODA5MDE3LzQwNDA4NzU5OC04ZjgxNzlkMS1hNDQ0LTQyOGQtOGIzMC0zNGJiYTk2ZGVjNDUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTVUMDMwNTQ5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZmYzNzM1YTBhMjk2ZWE4OTRhNTY3MjllYmFlMGVmN2ZkZTkwNTE3ZjdhYjM0NDdkM2EyNzJmMGY3NDEyMjZmZCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.Y8wdXb0Y8PhqXztDU7HTXA20lM1GxGeLKkVKCy2FpLw)