Skip to content

Commit 32fcdc9

Browse files
committed
Use more specific Scintilla notification flags
1 parent db9180c commit 32fcdc9

6 files changed

Lines changed: 8 additions & 8 deletions

File tree

src/decorators/BraceMatch.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ void BraceMatch::clearHighlighting()
105105
void BraceMatch::notify(const NotificationData *pscn)
106106
{
107107
if (pscn->nmhdr.code == Notification::UpdateUI) {
108-
if (FlagSet(pscn->updated, Update::Content) || FlagSet(pscn->updated, Update::Selection)) {
108+
if (FlagSet(pscn->updated, Update::Text) || FlagSet(pscn->updated, Update::Selection)) {
109109
doHighlighting();
110110
}
111111
}

src/decorators/HighlightedScrollBar.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ HighlightedScrollBarDecorator::~HighlightedScrollBarDecorator()
4343

4444
void HighlightedScrollBarDecorator::notify(const NotificationData *pscn)
4545
{
46-
if (pscn->nmhdr.code == Notification::UpdateUI && (FlagSet(pscn->updated, Update::Content) || FlagSet(pscn->updated, Update::Selection))) {
46+
if (pscn->nmhdr.code == Notification::UpdateUI && (FlagSet(pscn->updated, Update::Text) || FlagSet(pscn->updated, Update::Selection))) {
4747
scrollBar->update();
4848
}
4949
else if (pscn->nmhdr.code == Notification::Modified && FlagSet(pscn->modificationType, ModificationFlags::ChangeMarker)) {

src/decorators/SmartHighlighter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ SmartHighlighter::SmartHighlighter(ScintillaNext *editor) :
3838

3939
void SmartHighlighter::notify(const NotificationData *pscn)
4040
{
41-
if (pscn->nmhdr.code == Notification::UpdateUI && (FlagSet(pscn->updated, Update::Content) || FlagSet(pscn->updated, Update::Selection))) {
41+
if (pscn->nmhdr.code == Notification::UpdateUI && (FlagSet(pscn->updated, Update::Text) || FlagSet(pscn->updated, Update::Selection))) {
4242
highlightCurrentView();
4343
}
4444
}

src/dialogs/MainWindow.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1791,11 +1791,11 @@ void MainWindow::updateDocumentBasedUi(Scintilla::Update updated)
17911791

17921792
// TODO: what if this is triggered by an editor that is not the active editor?
17931793

1794-
if (Scintilla::FlagSet(updated, Scintilla::Update::Content)) {
1794+
if (Scintilla::FlagSet(updated, Scintilla::Update::Text)) {
17951795
updateSelectionBasedUi(editor);
17961796
}
17971797

1798-
if (Scintilla::FlagSet(updated, Scintilla::Update::Content) || Scintilla::FlagSet(updated, Scintilla::Update::Selection)) {
1798+
if (Scintilla::FlagSet(updated, Scintilla::Update::Text) || Scintilla::FlagSet(updated, Scintilla::Update::Selection)) {
17991799
updateContentBasedUi(editor);
18001800
}
18011801
}

src/docks/LanguageInspectorDock.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ void LanguageInspectorDock::disconnectFromEditor()
141141

142142
void LanguageInspectorDock::updatePositionInfo(Scintilla::Update updated)
143143
{
144-
if (FlagSet(updated, Scintilla::Update::Content) || FlagSet(updated, Scintilla::Update::Selection)) {
144+
if (FlagSet(updated, Scintilla::Update::Text) || FlagSet(updated, Scintilla::Update::Selection)) {
145145
ScintillaNext *editor = qobject_cast<ScintillaNext*>(sender());
146146
ui->lblInfo->setText(tr("Position %1 Style %2").arg(editor->currentPos()).arg(editor->styleAt(editor->currentPos())));
147147
}

src/widgets/EditorInfoStatusBar.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,11 @@ void EditorInfoStatusBar::editorUpdated(Scintilla::Update updated)
8686
{
8787
ScintillaNext *editor = qobject_cast<ScintillaNext *>(sender());
8888

89-
if (Scintilla::FlagSet(updated, Scintilla::Update::Content)) {
89+
if (Scintilla::FlagSet(updated, Scintilla::Update::Text)) {
9090
updateDocumentSize(editor);
9191
}
9292

93-
if (Scintilla::FlagSet(updated, Scintilla::Update::Content) || Scintilla::FlagSet(updated, Scintilla::Update::Selection)) {
93+
if (Scintilla::FlagSet(updated, Scintilla::Update::Text) || Scintilla::FlagSet(updated, Scintilla::Update::Selection)) {
9494
updateSelectionInfo(editor);
9595
}
9696
}

0 commit comments

Comments
 (0)