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

fix(container): truncate text by cell width/characters #1623

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

pynappo
Copy link
Collaborator

@pynappo pynappo commented Dec 24, 2024

Fixes #1619.

Current neo-tree behavior:

image

  • missing right side git status symbol for the middle file
  • truncation is mid-character for the bottom file

With this PR:

image

remaining issues (for future PRs?):

  • Fading isn't great on non-ascii:

image

  • Looks like padding needs to be added for wide characters:

image

Also idk if this is an issue with this PR or neo-tree (might just be exacerbated due to the more intensive truncation), but changing the width repeatedly, really quickly, seems to cause the neo-tree window to scroll horizontally?

image

tagging @Emptyfruit if they'd like to test this out.

in lua, any number is truthy, and sub works just fine on 0-length
strings so I don't think this does anything
@pynappo pynappo marked this pull request as ready for review December 24, 2024 10:21
@Emptyfruit
Copy link

Emptyfruit commented Dec 25, 2024

Tried basic file names in cyrillic on your branch. Seems great 👍 . Fading also works (though differs from ascii names, but thats minor imho). I'll keep this version just for background testing, since i don't have enough time to create more elaborate test cases (and i dont know how to properly regress test neo-tree anyways). I'll comment if something weird comes up, otherwise would be nice to merge )

image

@pynappo
Copy link
Collaborator Author

pynappo commented Dec 25, 2024

since i don't have enough time to create more elaborate test cases (and i dont know how to properly regress test neo-tree anyways). I'll comment if something weird comes up, otherwise would be nice to merge )

Oh yeah np, just wanted to make sure it helped with your issue. if anything i should be making test cases.

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.

BUG: Non-ascci file names being cut randomly if don't fit
2 participants