Modified source editor state not maintained correctly on loss of focus#1217
Merged
Conversation
TextEdit views in Dolphin have historically had only two model update modes: - Update on loss of focus (the default) - Update per-character (i.e. model updated as characters typed) Source editors in Dolphin use the first mode (the same is true of the XMLPad, Notepad, and Wordpad samples). One effect of this is that the "modified" indication in the browser status bar resets when tabbing away. Although the presenter does still know that the text has been changed, the model has been updated and the ScintillaView itself has been told the data is saved. This not only causes the indicator in the status bar to be incorrect, but also means that if we enable the change margin indicators in Scintilla, that these do not accurately show the change history. The TextEdit update modes are appropriate for normal single line text fields in forms, but we really need a mode that is more suitable for editors on larger bodies of text. This change replaces the updatePerChar boolean setting with an update mode. The update mode can be one of #focusLost, #perChar, or #explicit. The first two modes correspond to the updatePerChar being false, and true respectively. The other mode disables update of the model except when explicitly requested, which is more suitable for text editors. In order to make this modification a new STB version of TextEdit was required, which is complicated by the presence of subclasses with later STB versions. Consequently the STB version has had to jump to 22, and modifications to contributed code were required.
Includes rename of UI.Scintilla.IndicatorStyle to IndicatorDefinition: Style terminology is too confusing, since the definition has an indicator style, and various other attributes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TextEdit views in Dolphin have historically had only two model update modes:
Source editors in Dolphin use the first mode (the same is true of the XMLPad, Notepad, and Wordpad samples). One effect of this is that the "modified" indication in the browser status bar resets when tabbing away. Although the presenter does still know that the text has been changed, the model has been updated and the ScintillaView itself has been told the data is saved. This not only causes the indicator in the status bar to be incorrect, but also means that if we enable the change margin indicators in Scintilla, that these do not accurately show the change history. The TextEdit update modes are appropriate for normal single line text fields in forms, but we really need a mode that is more suitable for editors on larger bodies of text.
This change replaces the updatePerChar boolean setting with an update mode. The update mode can be one of #focusLost, #perChar, or #explicit. The first two modes correspond to the updatePerChar being false, and true respectively. The other mode disables update of the model except when explicitly requested, which is more suitable for text editors.
In order to make this modification a new STB version of TextEdit was required, which is complicated by the presence of subclasses with later STB versions. Consequently the STB version has had to jump to 22, and modifications to contributed code were required.
Also correct workspace options not always restoring correctly from registry.
Includes rename of UI.Scintilla.IndicatorStyle to IndicatorDefinition: Style terminology is too confusing, since the definition has an indicator style, and various other attributes.