Skip to content

Unwanted empty space at end of output #2008

@dcolascione

Description

@dcolascione

In _output_screen_diff we unconditionally draw a character cell (perhaps containing a space) at each line whether or not that line has any actual content. The result is unwanted spaces appearing at the end of output, e.g. if you start ipython in an empty terminal, the bottom-left corner of that terminal will have a space in it.

If we replace

                output_char(new_char)

with

                if new_max_line_len:
                    output_char(new_char)

we don't output the character when we nothing to show and end up with a cleaner terminal for the user.

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