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 moves based on hint #217

Merged
merged 17 commits into from
Dec 30, 2021
Merged

prompt moves based on hint #217

merged 17 commits into from
Dec 30, 2021

Conversation

elferherrera
Copy link
Contributor

@elferherrera elferherrera commented Dec 28, 2021

The prompt moves and gives space to hint when it is located at the bottom.

image
the prompt moves upwards based on the suggestion
image

Note: This also removes the issue when the suggestion was being redrawn every second

Copy link
Member

@sholderbach sholderbach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome that you are tackling that! I like the simplification. Will try to give it a thorough testing

src/painter.rs Outdated Show resolved Hide resolved
src/engine.rs Outdated Show resolved Hide resolved
src/engine.rs Outdated Show resolved Hide resolved
src/painter.rs Outdated Show resolved Hide resolved
src/painter.rs Outdated Show resolved Hide resolved
src/painter.rs Outdated Show resolved Hide resolved
@@ -35,6 +35,54 @@ impl PromptCoordinates {
}
}

pub struct PromptLines<'prompt> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bikeshed: BufferView as it does not care about the Prompt directly and View may reflect the reference nature. Same for the lifetime name

@sophiajt
Copy link
Contributor

Seeming some places where we need to output /r/n to keep things aligned:

image

@elferherrera
Copy link
Contributor Author

@jntrnr can you check with the new commit?

@sophiajt
Copy link
Contributor

@elferherrera same issue -

image

src/painter.rs Outdated Show resolved Hide resolved
@elferherrera
Copy link
Contributor Author

@jntrnr @sholderbach @fdncred do you mind checking the new commit?

@sophiajt
Copy link
Contributor

@elferherrera - same issue

image

@fdncred
Copy link
Collaborator

fdncred commented Dec 29, 2021

ya, same for me too.
Screen Shot 2021-12-29 at 4 16 14 PM

@elferherrera
Copy link
Contributor Author

@fdncred @sholderbach do you mind checking again this commit?

@sholderbach
Copy link
Member

Looking good to me. Even wrapping lines seem to be good at the bottom of the screen. The only thing i noticed that if the last line is reached with actual content, it jumps up a line to leave a blank line after a full repaint.

@fdncred
Copy link
Collaborator

fdncred commented Dec 30, 2021

I'd land this one and continue to work on other issues like 'very long buffer' and 'jumps up a line'.

@elferherrera
Copy link
Contributor Author

@fdncred I think that is a good idea. I dont want to make the PR larger

@sophiajt
Copy link
Contributor

sophiajt commented Dec 30, 2021

Tried out the latest - it doesn't seem to let you work with the last line of the screen:
image

I also noticed that if you have a multiline history hint at the bottom, clock tick scrolls:
image

The other odd thing in that second one: notice where the cursor is, but I'm typing on the line above it.

@sophiajt
Copy link
Contributor

Here's an animation to see these a little bit better:
Peek 2021-12-31 08-00

@fdncred
Copy link
Collaborator

fdncred commented Dec 30, 2021

it's interesting that I don't get this behavior on Mac.

@sophiajt
Copy link
Contributor

@elferherrera - thanks for banging this into shape!

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 this pull request may close these issues.

None yet

4 participants