Skip to content

tmux_cmd remove empty lines when it should not #402

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,

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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