Skip to content

tmux_cmd remove empty lines when it should not #402

Closed
@rockandska

Description

@rockandska

Hi,

I'm in the middle of writing a pytest-tmux plugin.
While writing unit/functional testing, I had an assertion test who failed for an obscure reason and didn't get why at first.
I finally discovered that capture-pane doesn't return what it really displayed.............

There's IMO a huge bug here.

Yes the empty lines should be cleaned but not all.

For example, a capture-pane of :

$ printf "  Hello World  .\n\n"
  Hello World  .

$






Should return :

$ printf "  Hello World  .\n\n"
  Hello World  .

$

and not

$ printf "  Hello World  .\n\n"
  Hello World  .
$

Any objection to clean empty lines starting from the last and stop until something is found ?

Regards,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions