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

Strangely formatted message in 80 columns: ◷ Searching... [...] #1329

Open
mgrojo opened this issue Feb 18, 2023 · 1 comment · May be fixed by alire-project/simple_logging#7
Open

Strangely formatted message in 80 columns: ◷ Searching... [...] #1329

mgrojo opened this issue Feb 18, 2023 · 1 comment · May be fixed by alire-project/simple_logging#7
Labels
type: bug Something isn't working

Comments

@mgrojo
Copy link
Contributor

mgrojo commented Feb 18, 2023

There's something strange when the number of columns in the terminal is 80 and the alr search command is executed.
image

If the terminal is widened, the progress message is output in one line, overwriting itself and then finally is overwritten by the result. I suppose this is the expected behaviour.

image
(first execution was in 80 columns and then the terminal was widened. Second execution, with the new width).

Maybe there's not much value in the message, it could be removed, if difficult to fix.

Copy and paste in 80 columns:

$ alr search xml
                                                                                ◷ Searching... Solving dependencies... Looking for external crate: gnat_external                                                                                ◷ Searching... Solving dependencies... Looking for external crate: gnat_external                                                                                                                                                                ◷ Searching... Solving dependencies... Looking for external crate: gnat_external                                                                                ◷ Searching... Solving dependencies... Looking for external crate: gnat_external                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                NAME           STATUS  VERSION  DESCRIPTION                                           NOTES
lace_xml               0.1.0    Provides simple XML read/write support.                    
matreshka_xml          21.0.0   Library to manipulate with XML streams and documents       
utilada_xml            2.5.0    Utility Library serialization with XML/Ada                 
xml_ez_out             1.6.0    Creation of XML-formatted output from Ada programs         
xmlada                 23.0.0   The XML/Ada toolkit                                        
@mgrojo mgrojo changed the title Strangely formatted message in 80 columns: ◷ Searching... Solving dependencies... Looking for external crate: gnat_external Strangely formatted message in 80 columns: ◷ Searching... [...] Feb 18, 2023
@mosteo mosteo added type: enhancement Improvements to existing functionality type: bug Something isn't working and removed type: enhancement Improvements to existing functionality labels Feb 20, 2023
@mosteo
Copy link
Member

mosteo commented Feb 20, 2023

I see, thanks. Yes, the second output is the intended one.

atalii added a commit to atalii/simple_logging that referenced this issue Nov 17, 2023
When the TTY is too narrow to contain the output, the assumption
that a carriage return and whitespace while erase the line no
longer holds. Prior to printing, check the number of columns
available in the TTY.

See alire-project/alire#1329 for a demonstration of the issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants