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

[patch ready] mcedit puts cursor in the middle of multibyte utf8 character #2631

Closed
mc-butler opened this issue Oct 14, 2011 · 6 comments
Closed
Labels
area: mcedit mcedit, the built-in text editor prio: medium Has the potential to affect progress ver: 4.7.5.5 Reproducible in version 4.7.5.5

Comments

@mc-butler
Copy link

Important

This issue was migrated from Trac:

Origin https://midnight-commander.org/ticket/2631
Reporter sergem

Sometimes when editing an UTF-8 file mcedit puts cursor in the middle of the multibyte utf8 character. And when it does, typing a new character results in an invalid utf8 sequence.

I've made some general purpose utf8test file and attached it. To reproduce this bug:

  1. Open this file in mcedit
  2. Put cursor to the end of "Combination of 2bchar + incorrect chars" line
  3. Press "Left" 5 times (notice, cursor moves 2 characters at a time)
  4. Press "q"

And you'd get a broken character.

PS: This bug is related to #2372 and #1730 but different from them.

Note

Original attachments:

@mc-butler
Copy link
Author

Changed by sergem on Oct 14, 2011 at 18:58 UTC

@mc-butler
Copy link
Author

Changed by angel_il (@ilia-maslakov) on Oct 15, 2011 at 14:55 UTC (comment 1)

fixed in #2372

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Oct 15, 2011 at 15:16 UTC (comment 2)

  • Blocked by set to #2372

@mc-butler
Copy link
Author

Changed by sergem on Oct 17, 2011 at 19:45 UTC

this patch should fix the problem

@mc-butler
Copy link
Author

Changed by angel_il (@ilia-maslakov) on Apr 6, 2012 at 13:00 UTC (comment 3)

  • Status changed from new to closed
  • Resolution set to fixed

see: #2372

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Apr 6, 2012 at 14:42 UTC (comment 4)

  • Milestone Future Releases deleted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: mcedit mcedit, the built-in text editor prio: medium Has the potential to affect progress ver: 4.7.5.5 Reproducible in version 4.7.5.5
Development

No branches or pull requests

1 participant