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

Formatting is broken following shift-enter #6113

Open
3 tasks done
miciasto opened this issue Jul 31, 2024 · 0 comments
Open
3 tasks done

Formatting is broken following shift-enter #6113

miciasto opened this issue Jul 31, 2024 · 0 comments

Comments

@miciasto
Copy link

  • Searched existing issues to avoid creating duplicates.
  • Confirmed that it can be reproduced in built-in themes without customized css.
  • Searched http://support.typora.io/

Describe the bug
There is a glitch when applying multiple formats to a line that immediately follows a shift-enter.

After the first format is applied, the selected region is changed, it incorrectly shrinks and no longer spans the whole line. It should have expanded to cover the closing format marker. This means subsequent formatting (or unformatting) is applied incorrectly.

To Reproduce
Steps to reproduce the behavior:

  1. Enter the text abcdef on a new line.
  2. Move the cursor between the c and d, and press shift-enter to insert a line break
  3. Select the entire line def
  4. Enter ctrl-u

Expected behavior
The result looks like this:
image

It should be like this (notice the selected region spans the whole line including the formatting characters):
image

Desktop (please complete the following information): and Typora Version:
1.9.3 on Linux Ubuntu 22.04
1.9.3 on Windows 11

Additional context
Due to this behaviour, applying multiple formats on the line will corrupt the text. More and more rubbish characters will be added to the line as more formatting is applied.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants