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

Print rest of line after cursor with large completion menu #700

Merged
merged 1 commit into from
Jan 11, 2024

Conversation

ysthakur
Copy link
Member

@ysthakur ysthakur commented Jan 8, 2024

Currently, if the buffer is too large to display all at once and you have a completion menu, the text after the cursor isn't displayed. Apparently, it's a difficult problem to show all of the text after the cursor that isn't covered by the menu, but this PR is only for showing the rest of the text on the same line as the cursor.

This is the current behavior. You can't tell which keys I'm pressing in the video, but when I type foo, then place my cursor before foo and hit tab to activate the completion menu, the foo disappears while my cursor is before it. If you move the cursor one word ahead, you'll see the foo again (my recording doesn't actually show this, I'll make a new one later when I'm not feeling so lazy but you should be able to reproduce on your own computer).

asciicast

This is the new behavior (you can't see the stuff on lines after the current one, but at least you can see the rest of the current line):

asciicast

Copy link

codecov bot commented Jan 8, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (b68ce33) 49.32% compared to head (583c591) 49.30%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #700      +/-   ##
==========================================
- Coverage   49.32%   49.30%   -0.02%     
==========================================
  Files          46       46              
  Lines        7988     7991       +3     
==========================================
  Hits         3940     3940              
- Misses       4048     4051       +3     
Files Coverage Δ
src/painting/painter.rs 18.48% <0.00%> (-0.15%) ⬇️

@fdncred fdncred merged commit 3e2c0fe into nushell:main Jan 11, 2024
8 checks passed
@ysthakur ysthakur mentioned this pull request Jan 12, 2024
@ysthakur ysthakur deleted the print-after-cursor branch January 12, 2024 21:12
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.

2 participants