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

[REPL] broken tab completion layout for methods #45836

Closed
vtjnash opened this issue Jun 27, 2022 · 3 comments · Fixed by #45844
Closed

[REPL] broken tab completion layout for methods #45836

vtjnash opened this issue Jun 27, 2022 · 3 comments · Fixed by #45844
Labels
regression Regression in behavior compared to a previous version REPL Julia's REPL (Read Eval Print Loop)

Comments

@vtjnash
Copy link
Sponsor Member

vtjnash commented Jun 27, 2022

julia> include(<tab>
include(mapexpr::Function, fname::AbstractString)
     @ Base.MainInclude client.jl:469                                                    include(fname::AbstractString)
     @ Base.MainInclude client.jl:470

expected (from v1.8):

julia> include(<tab>
include(mapexpr::Function, fname::AbstractString) in Base.MainInclude at client.jl:473  include(fname::AbstractString) in Base.MainInclude at client.jl:474
@vtjnash vtjnash added REPL Julia's REPL (Read Eval Print Loop) regression Regression in behavior compared to a previous version labels Jun 27, 2022
@Liozou
Copy link
Member

Liozou commented Jun 28, 2022

This was introduced by #45069. On my ubuntu terminal it only appears when the terminal has a width greater than 177, if that can help to identify the bug. Otherwise (if the terminal is small enough), it appears as

julia> include(<tab>
include(mapexpr::Function, fname::AbstractString)
     @ Base.MainInclude client.jl:469
include(fname::AbstractString)
     @ Base.MainInclude client.jl:470

which I assume is the new intended behaviour.

@Seelengrab
Copy link
Contributor

Seelengrab commented Jun 30, 2022

I was not aware of tab completion falling back to method printing directly - I'd have assumed it had more custom printing, since this should have been a problem with longer function signatures already, right?

Printing them in one column seems like a good alternative!

@Liozou
Copy link
Member

Liozou commented Jul 1, 2022

That's frankly understandable since there was no test on the printing of multicolumn REPL completion. The fix for this issue at #45844 (awaiting review) includes one.

It was not actually a problem with long function signatures because multi-column printing is decided depending on the width of the largest completion, so if one was too large it reverts to being on a single column. The only implicit assumption that #45069 broke was that no completion would include a newline, but that should have been tested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression Regression in behavior compared to a previous version REPL Julia's REPL (Read Eval Print Loop)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants