-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Trim in :pipe in 24.07 version #11177
Comments
Original issue: #10912 |
I didn't get a chance to review that PR. We should not be stripping arbitrary whitespace at the end. Only a single newline character should be trimmed (that is what kakoune does too for example) so |
I agree with #10912 only with realize this feature in new command like |
I believe the new trim in |
I can get a pr for this pretty quick, but just need to know the exact behavior. Should at least one newline always exist? Or no mater what remove a trailing newline if it exists? The original issue brought up how having the output with trailing whitespace was cumbersome:
What does your use case look like? @b52es |
https://github.com/mawww/kakoune/blame/840f4ec3ed14281cea6dd17c4c38d302963ae16d/src/normal.cc#L612 this is what kakoune does. Thre is no 100% perfect solution since shell commands don't behave consistently but I think what kakoune setteled on is reasonable and ist useful in the majority of situations. |
I am not sure if it is the same issue as The only workaround I can find is to change my program to output an extra character (a letter "x"), and then delete it. So the lines in my
(I tried doing it with |
24.07 release added trim in :pipe that kills newline symbol at the end of selection. Please return to 24.03 release behavior.
The text was updated successfully, but these errors were encountered: