Skip to content

Commit 28ce886

Browse files
committed
Pane(fix[paste_buffer]): -r changes separator to newline, not no-trailing
why: paste-buffer -r changes the inter-line separator from carriage return to newline. It does not suppress a trailing newline. Verified in cmd-paste-buffer.c: default sepstr is "\r", -r changes to "\n". what: - Rename no_trailing_newline param to linefeed_separator - Update docstring to reflect actual semantics
1 parent 6413708 commit 28ce886

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/libtmux/pane.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1330,7 +1330,7 @@ def paste_buffer(
13301330
*,
13311331
buffer_name: str | None = None,
13321332
delete_after: bool | None = None,
1333-
no_trailing_newline: bool | None = None,
1333+
linefeed_separator: bool | None = None,
13341334
bracket: bool | None = None,
13351335
separator: str | None = None,
13361336
) -> None:
@@ -1342,8 +1342,9 @@ def paste_buffer(
13421342
Name of the buffer to paste (``-b`` flag).
13431343
delete_after : bool, optional
13441344
Delete the buffer after pasting (``-d`` flag).
1345-
no_trailing_newline : bool, optional
1346-
Do not add a trailing newline (``-r`` flag).
1345+
linefeed_separator : bool, optional
1346+
Use newline as the line separator instead of carriage return
1347+
(``-r`` flag).
13471348
bracket : bool, optional
13481349
Use bracketed paste mode (``-p`` flag).
13491350
separator : str, optional
@@ -1359,7 +1360,7 @@ def paste_buffer(
13591360
if delete_after:
13601361
tmux_args += ("-d",)
13611362

1362-
if no_trailing_newline:
1363+
if linefeed_separator:
13631364
tmux_args += ("-r",)
13641365

13651366
if bracket:

0 commit comments

Comments
 (0)