When using :opt:strip_trailing_spaces do not remove empty lines
Fixes #1802
This commit is contained in:
parent
b7a11035d5
commit
9368f7f670
@ -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…
x
Reference in New Issue
Block a user