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

Backspacing a newline should automatically remove the \n at the end of the previous line #785

Open
ItielMaN opened this issue Feb 25, 2023 · 1 comment

Comments

@ItielMaN
Copy link

STR:

  1. Enter a 2-line translation in a certain PO file
  2. "Regret" your translation of the 2nd line and start backspacing it until you get back to the first line, effectively removing the 2nd line completely

AR:
The red \n text is still present at the end of the first line, and you have to backspace twice more to remove the 2 characters.

ER:
The \n should probably be automatically removed when the user backspaces the line afterwards.

@vslavik knowing you, I'm guessing this is intentional (probably to make sure the user doesn't accidentally backspace some of their actually-inserted-text?). If that's the case feel free to close this one, even though I'm still not convinced...

@vslavik
Copy link
Owner

vslavik commented Feb 27, 2023

@vslavik knowing you, I'm guessing this is intentional (probably to make sure the user doesn't accidentally backspace some of their actually-inserted-text?)

Not really. It is a consequence of how special characters are present in Poedit - as sequences of normal characters. This is because the native text editing control supports showing non-editable marks (e.g. ¶ for newlines) only on some platforms, so Poedit makes it part of the text.

Related: #604 is a near-duplicate, but using delete instead of backspace.

Over there I thought finding a better way to render all this would be better, but I'm not so sure anymore. There's another similar use case: placeholders, particularly complicated ones (e.g. from XLIFF), where it too would make sense to be able to delete it all at once as a special-purpose "token", and that should then apply to other special sequences like "\n<newline>" too.

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