-
Notifications
You must be signed in to change notification settings - Fork 73
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
Implement padchar configuration #46
Conversation
The purpose of padding out the whitespace at the end of the line is so that the line highlight is full-width. If your listchars setting causes the display to look bad, wouldn't a better solution be to change listchars for the aerial window? I think it would be reasonable to set a default that hides trailing spaces. Would you actually want the aerial window to have something other than whitespace padding out the line? |
I agree, one can change the window-local |
How about this as a solution then: I added a commit that disables most listchars by default in the aerial window. If you or anyone wants the padding characters to be different, you can modify those listchars with an autocmd, e.g. autocmd FileType aerial setlocal listchars+=trail:- Does that fix all of your issues? |
Yes, that would do it! Thanks a lot 😄 |
Small update: |
Apologies! When I tested I was using a global listchars value that included options that weren't removed by aerial, so the remaining window-local value was sufficient to override the global defaults. Upon further testing, that doesn't work if, for example, all you have set is |
Thank you yet again! I can now confirm that it is working as expected. Have a great day and keep up the good work 🎉 |
The the
rpad
andlpad
functions have a third parameter for an (optional) padchar but in it isn't passed anywhere (omitted here and here). That leads to" "
(whitespace) always being the padchar which (combined with alistchar
for trailing spaces) also leads to situations like this:In this PR, I've added a
padchar
option to the config for aerial that eliminates this problem.