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

Long input is truncated in rename prompt #279

Closed
ghost opened this issue Jun 6, 2019 · 7 comments
Closed

Long input is truncated in rename prompt #279

ghost opened this issue Jun 6, 2019 · 7 comments
Labels

Comments

@ghost
Copy link

ghost commented Jun 6, 2019

Environment details (Put x in the checkbox along with the information)

[x] Operating System: Arch, GNU/Linux
[x] Desktop Environment:
[x] Terminal Emulator: st
[x] Shell: zsh, sh, bash
[ ] Custom desktop opener (if applicable):
[x] Issue exists on nnn master

Exact steps to reproduce the issue

  1. Open nnn
  2. Rename any entry (^R)
  3. Type in a new name that is longer than the terminal width. Files are correctly renamed to any practical length, but input longer than $COLUMNS is not visible in the prompt. I suggest that the input prompt displays the end of the input string, if it is longer than the terminal width.

nnn rocks!

@jarun
Copy link
Owner

jarun commented Jun 6, 2019

I will leave it as a won'tfix. We can check the number of columns available for the name and then show those number of characters from the end. But there would be non-trivial cases with Unicode characters or when the name is being edited at the middle. I think I can spend my time doing something less clumsy.

Let's leave it to the user to choose a better terminal size if he is going to have very long names for the files.

@jarun jarun closed this as completed Jun 6, 2019
@jarun jarun added the wontfix label Jun 6, 2019
@jarun
Copy link
Owner

jarun commented Jun 6, 2019

BTW, if you are interested feel free to take a dig at it and raise a PR by all means.

@ghost
Copy link
Author

ghost commented Jun 6, 2019

Thanks, I'll take a look!

@jarun
Copy link
Owner

jarun commented Jun 6, 2019

Thank you so much!

@jarun
Copy link
Owner

jarun commented Jun 6, 2019

The other point I missed earlier - we do have the batch rename support where one can edit the file name in the editor.

@ghost
Copy link
Author

ghost commented Jun 6, 2019 via email

@jarun jarun added wontfix and removed wontfix labels Oct 11, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Jun 2, 2021
@jarun
Copy link
Owner

jarun commented Oct 29, 2021

@ghost this is fixed at commit b498c71.

@jarun jarun added bug and removed wontfix labels Oct 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant