Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

array printing: remove sometimes spurious empty lines #33298

Merged
merged 1 commit into from
Sep 18, 2019

Conversation

rfourquet
Copy link
Member

Consider the following vector, with not many columns available on the terminal. Because the first element doesn't fit on one line, the alignment mechanism currently forces all the other lines to be visually separated by empty lines:

4-element Array{Any,1}:
  "xxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxx"
 0                            
                              
                    
 0                            
                              
                    
 0

In this PR, we don't add aligning space on the right of elements from the last column:

4-element Array{Any,1}:
 "xxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxx"
0
0
0

@rfourquet rfourquet added domain:arrays [a, r, r, a, y, s] domain:display and printing Aesthetics and correctness of printed representations of objects. labels Sep 17, 2019
@JeffBezanson JeffBezanson merged commit 9999ab9 into master Sep 18, 2019
@delete-merged-branch delete-merged-branch bot deleted the rf/show-array-remove-lines branch September 18, 2019 17:16
@StefanKarpinski
Copy link
Sponsor Member

Oh man, that's been an annoyance for as long as I can remember. Thanks for fixing it!

@thofma
Copy link
Contributor

thofma commented Oct 1, 2019

Could this be backported?

@StefanKarpinski
Copy link
Sponsor Member

It's not really a bug fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:arrays [a, r, r, a, y, s] domain:display and printing Aesthetics and correctness of printed representations of objects.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants