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

Indentation of continuation lines broken when using non-standard input prompt #315

Closed
mgkurtz opened this issue Mar 27, 2023 · 3 comments Β· Fixed by #323
Closed

Indentation of continuation lines broken when using non-standard input prompt #315

mgkurtz opened this issue Mar 27, 2023 · 3 comments Β· Fixed by #323

Comments

@mgkurtz
Copy link

mgkurtz commented Mar 27, 2023

Using a custom input prompt, multi-line input is shown misaligned, but the cursor is at the position, where it should be, if all were well-aligned. This turns me quite mad πŸ˜΅β€πŸ’«

julia> OhMyREPL.input_prompt!("∴> ")

∴> """
   β–ˆ   abc
       """

The β–ˆ depicts where the cursor appears, when it is at the beginning of the second line, i.e. where a <Delete> will delete the a.

According to git bisect this bug was introduced with 1bc0e5b. Before that, I got

julia> OhMyREPL.input_prompt!("∴> ")

∴> """
   abc
   """

with cursor and display aligning correctly.

The bug appears with prompts of all lengths, but the default one.

@KristofferC
Copy link
Owner

Thanks for the report and the bisect. I'll try figure out where the divergence between the old tokenizer and the new one is.

@dhanak
Copy link

dhanak commented May 4, 2023

I confirm that this is broken. Downgrading OhMyREPL to v0.5.17 solves the issue.

(Also note that v0.5.18 is broken, it doesn't compile.)

@KristofferC
Copy link
Owner

I'm guessing #313 is a dup of this then.

c42f added a commit to c42f/OhMyREPL.jl that referenced this issue May 13, 2023
KristofferC pushed a commit that referenced this issue May 15, 2023
* Add JuliaSyntax-0.4 as a compatible version

* Fix indentation with custom prompts

Fixes #315
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants