mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-10-21 04:32:05 +00:00
When using :opt:strip_trailing_spaces do not remove empty lines
Fixes #1802
This commit is contained in:
parent
b7a11035d5
commit
9368f7f670
2 changed files with 4 additions and 1 deletions
|
|
@ -49,6 +49,9 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
|
|||
|
||||
- ssh kitten: Make argument parsing more like ssh (:iss:`1787`)
|
||||
|
||||
- When using :opt:`strip_trailing_spaces` do not remove empty lines
|
||||
(:iss:`1802`)
|
||||
|
||||
|
||||
0.14.2 [2019-06-09]
|
||||
---------------------
|
||||
|
|
|
|||
|
|
@ -469,7 +469,7 @@ class Window:
|
|||
lines = self.screen.text_for_selection()
|
||||
if self.opts.strip_trailing_spaces == 'always' or (
|
||||
self.opts.strip_trailing_spaces == 'smart' and not self.screen.is_rectangle_select()):
|
||||
lines = [l.rstrip() for l in lines]
|
||||
lines = ((l.rstrip() or '\n') for l in lines)
|
||||
return ''.join(lines)
|
||||
|
||||
def destroy(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue