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

show_preview box omits characters when command spans multiple lines #890

Open
ednolan opened this issue Apr 17, 2023 · 2 comments
Open

show_preview box omits characters when command spans multiple lines #890

ednolan opened this issue Apr 17, 2023 · 2 comments

Comments

@ednolan
Copy link

ednolan commented Apr 17, 2023

Screen Shot 2023-04-17 at 4 57 18 PM

Screen Shot 2023-04-17 at 4 57 36 PM

Reproduction:
On a terminal with a width of 212 characters, run this command (which has 219 characters):

echo 0123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107

Then use ctrl-r to bring up atuin.

The preview window shows the command as:

echo 01234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031
105106107

Omitting two characters around the newline it inserts: 04.

@ednolan
Copy link
Author

ednolan commented Apr 17, 2023

It seems like this is only an issue when style="full", not with style="compact".

@conradludgate
Copy link
Collaborator

Thanks for the report. Looks like our terminal width calculation is a little off

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

No branches or pull requests

2 participants