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 #278068 Second line feed was discarded #4359

Merged
merged 1 commit into from
Dec 10, 2018

Conversation

tobik
Copy link
Contributor

@tobik tobik commented Dec 9, 2018

This pull request fixes the discartion of the second inserted newline in a string.

Without the fix the EOL marker is applied to the first (already existing) line of text which already has the EOL marker. Now the second (new) line will get the EOL marker and thereafter both lines are set as EOL.

@anatoly-os anatoly-os merged commit 0a474ba into musescore:master Dec 10, 2018
@tobik tobik deleted the 278068-line-feed branch December 10, 2018 08:28
mattmcclinch added a commit to mattmcclinch/MuseScore that referenced this pull request Feb 3, 2021
…reak

Resolves: https://musescore.org/en/node/315754.

When musescore#4359 attempted to fix https://musescore.org/en/node/278068 (and was shortly followed up by musescore#4364), the end result was that when a newline is inserted into a text block (causing it to split into two text blocks), the second text block would always end with a newline, even if the original text block did not. This is fixed here by setting the second text block's EOL flag to that of the original text block.

This is what is attempted by the function that joins two text blocks when a newline is deleted, but that function wasn't getting it right either. So that has been corrected here as well.

Taken together, these two errors meant that there would be a blank line at the end of any text element that had ever contained a newline. This blank line would be small, but it would always be present, even if you tried to delete it.

Because this blank was always present in multiline text elements, and because it was small enough to not attract much attention, musescore#5881 only added an empty text fragment before a newline, and not after. But now that we do not have to have unwanted newline characters, in order to preserve the font size on a blank line, an empty text fragment may be needed after a newline also.
mattmcclinch added a commit to mattmcclinch/MuseScore that referenced this pull request Feb 3, 2021
…reak

Resolves: https://musescore.org/en/node/315754.

When musescore#4359 attempted to fix https://musescore.org/en/node/278068 (and was shortly followed up by musescore#4364), the end result was that when a newline is inserted into a text block (causing it to split into two text blocks), the second text block would always end with a newline, even if the original text block did not. This is fixed here by setting the second text block's EOL flag to that of the original text block.

This is what is attempted by the function that joins two text blocks when a newline is deleted, but that function wasn't getting it right either. So that has been corrected here as well.

Taken together, these two errors meant that there would be a blank line at the end of any text element that had ever contained a newline. This blank line would be small, but it would always be present, even if you tried to delete it.

Because this blank was always present in multiline text elements, and because it was small enough to not attract much attention, musescore#5881 only added an empty text fragment before a newline, and not after. But now that we do not have to have unwanted newline characters, in order to preserve the font size on a blank line, an empty text fragment may be needed after a newline also.
vpereverzev pushed a commit that referenced this pull request Feb 3, 2021
…reak

Resolves: https://musescore.org/en/node/315754.

When #4359 attempted to fix https://musescore.org/en/node/278068 (and was shortly followed up by #4364), the end result was that when a newline is inserted into a text block (causing it to split into two text blocks), the second text block would always end with a newline, even if the original text block did not. This is fixed here by setting the second text block's EOL flag to that of the original text block.

This is what is attempted by the function that joins two text blocks when a newline is deleted, but that function wasn't getting it right either. So that has been corrected here as well.

Taken together, these two errors meant that there would be a blank line at the end of any text element that had ever contained a newline. This blank line would be small, but it would always be present, even if you tried to delete it.

Because this blank was always present in multiline text elements, and because it was small enough to not attract much attention, #5881 only added an empty text fragment before a newline, and not after. But now that we do not have to have unwanted newline characters, in order to preserve the font size on a blank line, an empty text fragment may be needed after a newline also.
mattmcclinch added a commit to mattmcclinch/MuseScore that referenced this pull request Feb 15, 2021
…reak

Resolves: https://musescore.org/en/node/316754.

When musescore#4359 attempted to fix https://musescore.org/en/node/278068 (and was shortly followed up by musescore#4364), the end result was that when a newline is inserted into a text block (causing it to split into two text blocks), the second text block would always end with a newline, even if the original text block did not. This is fixed here by setting the second text block's EOL flag to that of the original text block.

This is what is attempted by the function that joins two text blocks when a newline is deleted, but that function wasn't getting it right either. So that has been corrected here as well.

Taken together, these two errors meant that there would be a blank line at the end of any text element that had ever contained a newline. This blank line would be small, but it would always be present, even if you tried to delete it.

Because this blank was always present in multiline text elements, and because it was small enough to not attract much attention, musescore#5881 only added an empty text fragment before a newline, and not after. But now that we do not have to have unwanted newline characters, in order to preserve the font size on a blank line, an empty text fragment may be needed after a newline also.
mattmcclinch added a commit to mattmcclinch/MuseScore that referenced this pull request Feb 15, 2021
…reak

Resolves: https://musescore.org/en/node/316754.

When musescore#4359 attempted to fix https://musescore.org/en/node/278068 (and was shortly followed up by musescore#4364), the end result was that when a newline is inserted into a text block (causing it to split into two text blocks), the second text block would always end with a newline, even if the original text block did not. This is fixed here by setting the second text block's EOL flag to that of the original text block.

This is what is attempted by the function that joins two text blocks when a newline is deleted, but that function wasn't getting it right either. So that has been corrected here as well.

Taken together, these two errors meant that there would be a blank line at the end of any text element that had ever contained a newline. This blank line would be small, but it would always be present, even if you tried to delete it.

Because this blank was always present in multiline text elements, and because it was small enough to not attract much attention, musescore#5881 only added an empty text fragment before a newline, and not after. But now that we do not have to have unwanted newline characters, in order to preserve the font size on a blank line, an empty text fragment may be needed after a newline also.
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.

2 participants