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

prompt misalignment when line_break disabled #112

Closed
pseudo-su opened this issue Jul 24, 2019 · 11 comments
Closed

prompt misalignment when line_break disabled #112

pseudo-su opened this issue Jul 24, 2019 · 11 comments
Labels
🐛 bug Something isn't working as expected.

Comments

@pseudo-su
Copy link

pseudo-su commented Jul 24, 2019

Bug Report

I think this is a bug

Current Behavior

cursor appears on the incorrect line when setting line_break.disabled to be true

Expected Behavior

cursor should appear on the same line as the prompt

Additional context/Screenshots

misalignment

misalignment2

Environment

  • Starship version: 0.3.2
  • Shell type: fish
  • Shell version: 3.0.2
  • Shell plugin manager: omf
  • Terminal emulator: alacritty
  • Operating system: OSX 10.14.5

Starship Configuration

# ~/.config/starship.toml

[line_break]
disabled = false
@pseudo-su
Copy link
Author

pseudo-su commented Jul 24, 2019

The other question I have is if/how I can remove the extra line between prompts in starship (I think I used SPACEFISH_PROMPT_ADD_NEWLINE=false with spacefish).

Super excited by this library/project btw 👌🎉

@matchai matchai added the 🐛 bug Something isn't working as expected. label Jul 24, 2019
@matchai
Copy link
Member

matchai commented Jul 24, 2019

I have unfortunately been unable to reproduce this bug with the same configuration on Alacritty (without OMF though). Is it possible that it is caused by anything in your Alacritty config?

The other question I have is if/how I can remove the extra line between prompts in starship (I think I used SPACEFISH_PROMPT_ADD_NEWLINE=false with spacefish).

That will absolutely be coming soon. For the time being it's hard-coded, but we will be building out more configuration options for the coming releases. 🙂

Super excited by this library/project btw 👌🎉

We are too! 😄🙌

@pseudo-su
Copy link
Author

It's not just alacrity, I installed iTerm2 to test and it also happens there.
Possibly it's something to do with one of these? (they differ from yours/my screenshot).

  • The module that's displaying the package info (in mine it's is 📦 v0.0.1)
  • the working changes section of the the git module ([!+]/[!?])

I might try and look at a bit more into it today

@matchai
Copy link
Member

matchai commented Jul 25, 2019

With the package and git status modules, I was still unable to encounter the same bug.

What causes your prompt to show the time on the right-hand side? I can imagine that that could be a source of problems.

@pseudo-su
Copy link
Author

I... actually don't know, I'll look into that 😅

@pseudo-su
Copy link
Author

Looks like you're right... Temporarily disabling omf seemed to fix the issue.

I don't know what plugin is causing it yet, but I have the following installed
omf list

@pseudo-su
Copy link
Author

If I was to look into adding the equivalent of SPACEFISH_PROMPT_ADD_NEWLINE support how/where would you want me to do it?

@matchai
Copy link
Member

matchai commented Jul 25, 2019

This is where the new line is currently added:
https://github.com/starship/starship/blob/master/src/print.rs#L30-L31

The config value can be extracted from context.config at that point.

@matchai
Copy link
Member

matchai commented Jul 25, 2019

Closing this issue as it was caused by omf.

@matchai matchai closed this as completed Jul 25, 2019
@matchai
Copy link
Member

matchai commented Jul 25, 2019

@pseudo-su I had some planned refactoring around the way configuration works, so I quickly included configuration for add_newline in the process: #116

@pseudo-su
Copy link
Author

For any future people having the same problem, fastest way to solve the problem was to use a different omf theme that doesn't have the subtle timestamp hanging off to the right of the prompt (that is part of the default theme)
I used the pure theme.

> omf install pure
> omf theme pure

@pseudo-su I had some planned refactoring around the way configuration works, so I quickly included configuration for add_newline in the process: #116

🎉 I've installed this branch and it's working a treat, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working as expected.
Projects
None yet
Development

No branches or pull requests

2 participants