mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-24 06:14:47 +02:00
Fix some "Go to settings" in Style Configurator go to wrong section
Fix #14882, close #14903
This commit is contained in:
parent
52fa5a3b8a
commit
12c6777bc1
@ -905,81 +905,105 @@ void WordStyleDlg::setStyleListFromLexer(int index)
|
|||||||
std::pair<intptr_t, intptr_t> WordStyleDlg::goToPreferencesSettings()
|
std::pair<intptr_t, intptr_t> WordStyleDlg::goToPreferencesSettings()
|
||||||
{
|
{
|
||||||
std::pair<intptr_t, intptr_t> result;
|
std::pair<intptr_t, intptr_t> result;
|
||||||
result.first = -1;
|
result.first = -1; // Page
|
||||||
result.second = -1;
|
result.second = -1; // Control
|
||||||
|
|
||||||
|
enum preferencesSectionPage {
|
||||||
|
general = 0,
|
||||||
|
edit1,
|
||||||
|
edit2,
|
||||||
|
darkMode,
|
||||||
|
margins,
|
||||||
|
newDocument,
|
||||||
|
defaultDirectory,
|
||||||
|
recentFileHistory,
|
||||||
|
fileAssociation,
|
||||||
|
language,
|
||||||
|
highlighting,
|
||||||
|
print,
|
||||||
|
searching,
|
||||||
|
backup,
|
||||||
|
autoCompletion,
|
||||||
|
multiInstance,
|
||||||
|
delimiter,
|
||||||
|
performance,
|
||||||
|
cloudAndLink,
|
||||||
|
searchEngine,
|
||||||
|
misc
|
||||||
|
};
|
||||||
|
|
||||||
Style& style = getCurrentStyler();
|
Style& style = getCurrentStyler();
|
||||||
|
|
||||||
// Global override style
|
// Global override style
|
||||||
if (style._styleDesc == TEXT("Current line background colour"))
|
if (style._styleDesc == TEXT("Current line background colour"))
|
||||||
{
|
{
|
||||||
result.first = 1;
|
result.first = edit1;
|
||||||
result.second = IDC_RADIO_CLM_HILITE;
|
result.second = IDC_RADIO_CLM_HILITE;
|
||||||
}
|
}
|
||||||
else if (style._styleDesc == TEXT("Caret colour"))
|
else if (style._styleDesc == TEXT("Caret colour"))
|
||||||
{
|
{
|
||||||
result.first = 1;
|
result.first = edit1;
|
||||||
result.second = IDC_WIDTH_COMBO;
|
result.second = IDC_WIDTH_COMBO;
|
||||||
}
|
}
|
||||||
else if (style._styleDesc == TEXT("Edge colour"))
|
else if (style._styleDesc == TEXT("Edge colour"))
|
||||||
{
|
{
|
||||||
result.first = 3;
|
result.first = margins;
|
||||||
result.second = IDC_COLUMNPOS_EDIT;
|
result.second = IDC_COLUMNPOS_EDIT;
|
||||||
}
|
}
|
||||||
else if (style._styleDesc == TEXT("Line number margin"))
|
else if (style._styleDesc == TEXT("Line number margin"))
|
||||||
{
|
{
|
||||||
result.first = 3;
|
result.first = margins;
|
||||||
result.second = IDC_CHECK_LINENUMBERMARGE;
|
result.second = IDC_CHECK_LINENUMBERMARGE;
|
||||||
}
|
}
|
||||||
else if (style._styleDesc == TEXT("Bookmark margin"))
|
else if (style._styleDesc == TEXT("Bookmark margin"))
|
||||||
{
|
{
|
||||||
result.first = 3;
|
result.first = margins;
|
||||||
result.second = IDC_CHECK_BOOKMARKMARGE;
|
result.second = IDC_CHECK_BOOKMARKMARGE;
|
||||||
}
|
}
|
||||||
else if (style._styleDesc == TEXT("Change History margin"))
|
else if (style._styleDesc == TEXT("Change History margin"))
|
||||||
{
|
{
|
||||||
result.first = 3;
|
result.first = margins;
|
||||||
result.second = IDC_CHECK_CHANGHISTORYMARGIN;
|
result.second = IDC_CHECK_CHANGHISTORYMARGIN;
|
||||||
}
|
}
|
||||||
else if (style._styleDesc == TEXT("Fold") || style._styleDesc == TEXT("Fold active") || style._styleDesc == TEXT("Fold margin"))
|
else if (style._styleDesc == TEXT("Fold") || style._styleDesc == TEXT("Fold active") || style._styleDesc == TEXT("Fold margin"))
|
||||||
{
|
{
|
||||||
result.first = 3;
|
result.first = margins;
|
||||||
result.second = IDC_RADIO_BOX;
|
result.second = IDC_RADIO_BOX;
|
||||||
}
|
}
|
||||||
else if (style._styleDesc == TEXT("Smart Highlighting"))
|
else if (style._styleDesc == TEXT("Smart Highlighting"))
|
||||||
{
|
{
|
||||||
result.first = 9;
|
result.first = highlighting;
|
||||||
result.second = IDC_CHECK_ENABLSMARTHILITE;
|
result.second = IDC_CHECK_ENABLSMARTHILITE;
|
||||||
}
|
}
|
||||||
else if (style._styleDesc == TEXT("Tags match highlighting"))
|
else if (style._styleDesc == TEXT("Tags match highlighting"))
|
||||||
{
|
{
|
||||||
result.first = 9;
|
result.first = highlighting;
|
||||||
result.second = IDC_CHECK_ENABLTAGSMATCHHILITE;
|
result.second = IDC_CHECK_ENABLTAGSMATCHHILITE;
|
||||||
}
|
}
|
||||||
else if (style._styleDesc == TEXT("Tags attribute"))
|
else if (style._styleDesc == TEXT("Tags attribute"))
|
||||||
{
|
{
|
||||||
result.first = 9;
|
result.first = highlighting;
|
||||||
result.second = IDC_CHECK_ENABLTAGATTRHILITE;
|
result.second = IDC_CHECK_ENABLTAGATTRHILITE;
|
||||||
}
|
}
|
||||||
else if (style._styleDesc == TEXT("Mark Style 1") || style._styleDesc == TEXT("Mark Style 2") || style._styleDesc == TEXT("Mark Style 3")
|
else if (style._styleDesc == TEXT("Mark Style 1") || style._styleDesc == TEXT("Mark Style 2") || style._styleDesc == TEXT("Mark Style 3")
|
||||||
|| style._styleDesc == TEXT("Mark Style 4") || style._styleDesc == TEXT("Mark Style 5"))
|
|| style._styleDesc == TEXT("Mark Style 4") || style._styleDesc == TEXT("Mark Style 5"))
|
||||||
{
|
{
|
||||||
result.first = 9;
|
result.first = highlighting;
|
||||||
result.second = IDC_CHECK_MARKALLCASESENSITIVE;
|
result.second = IDC_CHECK_MARKALLCASESENSITIVE;
|
||||||
}
|
}
|
||||||
else if (style._styleDesc == TEXT("URL hovered"))
|
else if (style._styleDesc == TEXT("URL hovered"))
|
||||||
{
|
{
|
||||||
result.first = 17;
|
result.first = cloudAndLink;
|
||||||
result.second = IDC_CHECK_CLICKABLELINK_ENABLE;
|
result.second = IDC_CHECK_CLICKABLELINK_ENABLE;
|
||||||
}
|
}
|
||||||
else if (style._styleDesc == TEXT("EOL custom color"))
|
else if (style._styleDesc == TEXT("EOL custom color"))
|
||||||
{
|
{
|
||||||
result.first = 2;
|
result.first = edit2;
|
||||||
result.second = IDC_CHECK_WITHCUSTOMCOLOR_CRLF;
|
result.second = IDC_CHECK_WITHCUSTOMCOLOR_CRLF;
|
||||||
}
|
}
|
||||||
else if (style._styleDesc == g_npcStyleName)
|
else if (style._styleDesc == g_npcStyleName)
|
||||||
{
|
{
|
||||||
result.first = 2;
|
result.first = edit2;
|
||||||
result.second = IDC_CHECK_NPC_COLOR;
|
result.second = IDC_CHECK_NPC_COLOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user