mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-23 22:04:55 +02:00
[BUG_FIXED] Fix the Find in files performance issue due to change line marker.
Make the default colours for the global styles. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@437 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
c81c6ab82a
commit
c6a0498215
@ -17,18 +17,18 @@
|
||||
|
||||
; Define the application name
|
||||
!define APPNAME "Notepad++"
|
||||
!define APPVERSION "5.2"
|
||||
!define APPNAMEANDVERSION "Notepad++ v5.2"
|
||||
!define APPVERSION "5.3"
|
||||
!define APPNAMEANDVERSION "Notepad++ v5.3"
|
||||
!define APPWEBSITE "http://notepad-plus.sourceforge.net/"
|
||||
|
||||
!define VERSION_MAJOR 5
|
||||
!define VERSION_MINOR 2
|
||||
!define VERSION_MINOR 3
|
||||
|
||||
; Main Install settings
|
||||
Name "${APPNAMEANDVERSION}"
|
||||
InstallDir "$PROGRAMFILES\Notepad++"
|
||||
InstallDirRegKey HKLM "Software\${APPNAME}" ""
|
||||
OutFile "..\bin\npp.5.2.Installer.exe"
|
||||
OutFile "..\bin\npp.5.3.Installer.exe"
|
||||
|
||||
; GetWindowsVersion
|
||||
;
|
||||
@ -430,6 +430,11 @@ GLOBAL_INST:
|
||||
IfFileExists "$INSTDIR\plugins\NppAutoIndent.dll" 0 +3
|
||||
MessageBox MB_OK "Due to the stabilty issue,$\nNppAutoIndent.dll is about to be deleted.$\nYou can download it via menu $\"?->Get more plugins$\" if you really need it."
|
||||
Delete "$INSTDIR\plugins\NppAutoIndent.dll"
|
||||
|
||||
IfFileExists "$INSTDIR\plugins\ComparePlugin.dll" 0 +3
|
||||
MessageBox MB_OK "Due to the problem of compability with this version,$\nComparePlugin.dll is about to be deleted.$\nYou can download it via menu $\"?->Get more plugins$\" if you really need it."
|
||||
Delete "$INSTDIR\plugins\ComparePlugin.dll"
|
||||
|
||||
; detect the right of
|
||||
UserInfo::GetAccountType
|
||||
Pop $1
|
||||
@ -556,7 +561,11 @@ SubSection "Auto-completion Files" autoCompletionComponent
|
||||
SetOutPath "$INSTDIR\plugins\APIs"
|
||||
File "..\bin\plugins\APIs\nsis.xml"
|
||||
SectionEnd
|
||||
|
||||
|
||||
Section AWK
|
||||
SetOutPath "$INSTDIR\plugins\APIs"
|
||||
File "..\bin\plugins\APIs\awk.xml"
|
||||
SectionEnd
|
||||
SubSectionEnd
|
||||
|
||||
SubSection "Plugins" Plugins
|
||||
@ -622,14 +631,14 @@ SubSection "Plugins" Plugins
|
||||
SetOutPath "$INSTDIR\plugins"
|
||||
File "..\bin\plugins\NppExport.dll"
|
||||
SectionEnd
|
||||
|
||||
/*
|
||||
Section "ComparePlugin" ComparePlugin
|
||||
Delete "$INSTDIR\plugins\ComparePlugin.dll"
|
||||
SetOutPath "$INSTDIR\plugins"
|
||||
File "..\bin\plugins\ComparePlugin.dll"
|
||||
SectionEnd
|
||||
|
||||
/*
|
||||
|
||||
Section "NppAutoIndent" NppAutoIndent
|
||||
Delete "$INSTDIR\plugins\NppAutoIndent.dll"
|
||||
SetOutPath "$INSTDIR\plugins"
|
||||
@ -797,7 +806,13 @@ SubSection un.autoCompletionComponent
|
||||
Section un.NSIS
|
||||
Delete "$INSTDIR\plugins\APIs\nsis.xml"
|
||||
RMDir "$INSTDIR\plugins\APIs\"
|
||||
SectionEnd
|
||||
SectionEnd
|
||||
|
||||
Section un.AWK
|
||||
Delete "$INSTDIR\plugins\APIs\awk.xml"
|
||||
RMDir "$INSTDIR\plugins\APIs\"
|
||||
SectionEnd
|
||||
|
||||
SubSectionEnd
|
||||
|
||||
SubSection un.Plugins
|
||||
|
@ -2033,7 +2033,6 @@ BOOL Notepad_plus::notify(SCNotification *notification)
|
||||
TBHDR * tabNotification = (TBHDR*) notification;
|
||||
switch (notification->nmhdr.code)
|
||||
{
|
||||
|
||||
case SCN_MODIFIED:
|
||||
{
|
||||
static bool prevWasEdit = false;
|
||||
@ -2058,7 +2057,7 @@ BOOL Notepad_plus::notify(SCNotification *notification)
|
||||
prevWasEdit = false;
|
||||
}
|
||||
|
||||
if (!_isFileOpening /*&& _pEditView->hasMarginShowed(ScintillaEditView::_SC_MARGE_MODIFMARKER)*/)
|
||||
if (!_isFileOpening && (isFromPrimary || isFromSecondary))
|
||||
{
|
||||
bool isProcessed = false;
|
||||
|
||||
|
@ -161,9 +161,8 @@ void ScintillaEditView::init(HINSTANCE hInst, HWND hPere)
|
||||
execute(SCI_SETMARGINTYPEN, _SC_MARGE_MODIFMARKER, SC_MARGIN_BACK);
|
||||
showMargin(_SC_MARGE_MODIFMARKER, true);
|
||||
|
||||
execute(SCI_MARKERSETFORE, MARK_LINEMODIFIEDUNSAVED, (LPARAM)red);
|
||||
execute(SCI_MARKERDEFINEPIXMAP, MARK_LINEMODIFIEDUNSAVED, (LPARAM)modifUnsaved_xpm);
|
||||
execute(SCI_MARKERDEFINEPIXMAP, MARK_LINEMODIFIEDSAVED, (LPARAM)modifSaved_xpm);
|
||||
execute(SCI_MARKERDEFINE, MARK_LINEMODIFIEDSAVED, SCI_MARKERDEFINE);
|
||||
execute(SCI_MARKERDEFINE, MARK_LINEMODIFIEDUNSAVED, SCI_MARKERDEFINE);
|
||||
|
||||
execute(SCI_MARKERSETALPHA, MARK_BOOKMARK, 70);
|
||||
execute(SCI_MARKERDEFINEPIXMAP, MARK_BOOKMARK, (LPARAM)bookmark_xpm);
|
||||
@ -361,11 +360,6 @@ LRESULT ScintillaEditView::scintillaNew_Proc(HWND hwnd, UINT Message, WPARAM wPa
|
||||
return _callWindowProc(_scintillaDefaultProc, hwnd, Message, wParam, lParam);
|
||||
}
|
||||
|
||||
void ScintillaEditView::setSpecialIndicator(Style & styleToSet)
|
||||
{
|
||||
execute(SCI_INDICSETFORE, styleToSet._styleID, styleToSet._bgColor);
|
||||
}
|
||||
|
||||
|
||||
void ScintillaEditView::setSpecialStyle(Style & styleToSet)
|
||||
{
|
||||
@ -927,48 +921,66 @@ void ScintillaEditView::defineDocType(LangType typeDoc)
|
||||
execute(SCI_STYLECLEARALL);
|
||||
int oldBits = execute(SCI_GETSTYLEBITSNEEDED);
|
||||
|
||||
Style *pStyle;
|
||||
Style defaultIndicatorStyle;
|
||||
|
||||
defaultIndicatorStyle._styleID = SCE_UNIVERSAL_FOUND_STYLE;
|
||||
defaultIndicatorStyle._bgColor = red;
|
||||
pStyle = &defaultIndicatorStyle;
|
||||
int iFind = stylers.getStylerIndexByID(SCE_UNIVERSAL_FOUND_STYLE);
|
||||
if (iFind != -1)
|
||||
{
|
||||
Style & styleFind = stylers.getStyler(iFind);
|
||||
setSpecialIndicator(styleFind);
|
||||
pStyle = &(stylers.getStyler(iFind));
|
||||
}
|
||||
setSpecialIndicator(*pStyle);
|
||||
|
||||
defaultIndicatorStyle._styleID = SCE_UNIVERSAL_FOUND_STYLE_2;
|
||||
defaultIndicatorStyle._bgColor = liteGreen;
|
||||
pStyle = &defaultIndicatorStyle;
|
||||
iFind = stylers.getStylerIndexByID(SCE_UNIVERSAL_FOUND_STYLE_2);
|
||||
if (iFind != -1)
|
||||
{
|
||||
Style & styleFind = stylers.getStyler(iFind);
|
||||
setSpecialIndicator(styleFind);
|
||||
pStyle = &(stylers.getStyler(iFind));
|
||||
}
|
||||
setSpecialIndicator(*pStyle);
|
||||
|
||||
defaultIndicatorStyle._styleID = SCE_UNIVERSAL_FOUND_STYLE_INC;
|
||||
defaultIndicatorStyle._bgColor = blue;
|
||||
pStyle = &defaultIndicatorStyle;
|
||||
iFind = stylers.getStylerIndexByID(SCE_UNIVERSAL_FOUND_STYLE_INC);
|
||||
if (iFind != -1)
|
||||
{
|
||||
Style & styleFind = stylers.getStyler(iFind);
|
||||
setSpecialIndicator(styleFind);
|
||||
pStyle = &(stylers.getStyler(iFind));
|
||||
}
|
||||
setSpecialIndicator(*pStyle);
|
||||
|
||||
defaultIndicatorStyle._styleID = SCE_UNIVERSAL_TAGMATCH;
|
||||
defaultIndicatorStyle._bgColor = RGB(0x00, 0x80, 0xFF);
|
||||
pStyle = &defaultIndicatorStyle;
|
||||
iFind = stylers.getStylerIndexByID(SCE_UNIVERSAL_TAGMATCH);
|
||||
if (iFind != -1)
|
||||
{
|
||||
Style & styleFind = stylers.getStyler(iFind);
|
||||
setSpecialIndicator(styleFind);
|
||||
pStyle = &(stylers.getStyler(iFind));
|
||||
}
|
||||
setSpecialIndicator(*pStyle);
|
||||
|
||||
defaultIndicatorStyle._styleID = SCE_UNIVERSAL_TAGATTR;
|
||||
defaultIndicatorStyle._bgColor = yellow;
|
||||
pStyle = &defaultIndicatorStyle;
|
||||
iFind = stylers.getStylerIndexByID(SCE_UNIVERSAL_TAGATTR);
|
||||
if (iFind != -1)
|
||||
{
|
||||
Style & styleFind = stylers.getStyler(iFind);
|
||||
setSpecialIndicator(styleFind);
|
||||
pStyle = &(stylers.getStyler(iFind));
|
||||
}
|
||||
|
||||
setSpecialIndicator(*pStyle);
|
||||
/*
|
||||
iFind = stylers.getStylerIndexByID(SCE_UNIVERSAL_SELECT_STYLE);
|
||||
if (iFind != -1)
|
||||
{
|
||||
Style & styleFind = stylers.getStyler(iFind);
|
||||
setSpecialStyle(styleFind);
|
||||
}
|
||||
|
||||
*/
|
||||
int caretWidth = 1;
|
||||
|
||||
|
||||
@ -1777,8 +1789,8 @@ void ScintillaEditView::performGlobalStyles()
|
||||
{
|
||||
Style & style = stylers.getStyler(i);
|
||||
selectColorBack = style._bgColor;
|
||||
execute(SCI_SETSELBACK, 1, selectColorBack);
|
||||
}
|
||||
execute(SCI_SETSELBACK, 1, selectColorBack);
|
||||
|
||||
COLORREF caretColor = black;
|
||||
i = stylers.getStylerIndexByID(SCI_SETCARETFORE);
|
||||
@ -1823,6 +1835,24 @@ void ScintillaEditView::performGlobalStyles()
|
||||
for (int j = 0 ; j < NB_FOLDER_STATE ; j++)
|
||||
defineMarker(_markersArray[FOLDER_TYPE][j], _markersArray[_folderStyle][j], foldfgColor, foldbgColor);
|
||||
|
||||
COLORREF unsavedChangebgColor = liteRed;
|
||||
i = stylers.getStylerIndexByName(TEXT("Unsaved change marker"));
|
||||
if (i != -1)
|
||||
{
|
||||
Style & style = stylers.getStyler(i);
|
||||
unsavedChangebgColor = style._bgColor;
|
||||
}
|
||||
execute(SCI_MARKERSETBACK, MARK_LINEMODIFIEDUNSAVED, unsavedChangebgColor);
|
||||
|
||||
COLORREF savedChangebgColor = liteBlueGreen;
|
||||
i = stylers.getStylerIndexByName(TEXT("Saved change marker"));
|
||||
if (i != -1)
|
||||
{
|
||||
Style & style = stylers.getStyler(i);
|
||||
savedChangebgColor = style._bgColor;
|
||||
}
|
||||
execute(SCI_MARKERSETBACK, MARK_LINEMODIFIEDSAVED, savedChangebgColor);
|
||||
|
||||
COLORREF wsSymbolFgColor = black;
|
||||
i = stylers.getStylerIndexByName(TEXT("White space symbol"));
|
||||
if (i != -1)
|
||||
|
@ -592,7 +592,10 @@ protected:
|
||||
inline void makeStyle(LangType langType, const TCHAR **keywordArray = NULL);
|
||||
void setStyle(Style styleToSet); //NOT by reference (style edited)
|
||||
void setSpecialStyle(Style & styleToSet); //by reference
|
||||
void setSpecialIndicator(Style & styleToSet);
|
||||
void setSpecialIndicator(Style & styleToSet) {
|
||||
execute(SCI_INDICSETFORE, styleToSet._styleID, styleToSet._bgColor);
|
||||
};
|
||||
|
||||
//Complex lexers (same lexer, different language)
|
||||
void setXmlLexer(LangType type);
|
||||
void setCppLexer(LangType type);
|
||||
|
@ -26,6 +26,8 @@ const COLORREF offWhite = RGB(0xFF, 0xFB, 0xF0);
|
||||
const COLORREF darkGreen = RGB(0, 0x80, 0);
|
||||
const COLORREF liteGreen = RGB(0, 0xFF, 0);
|
||||
const COLORREF blueGreen = RGB(0, 0x80, 0x80);
|
||||
const COLORREF liteRed = RGB(0xFF, 0xAA, 0xAA);
|
||||
const COLORREF liteBlueGreen = RGB(0xAA, 0xFF, 0xC8);
|
||||
|
||||
const COLORREF liteBlue = RGB(0xA6, 0xCA, 0xF0);
|
||||
const COLORREF veryLiteBlue = RGB(0xC4, 0xF9, 0xFD);
|
||||
|
@ -721,5 +721,7 @@
|
||||
<WidgetStyle name="Active tab unfocused indicator" styleID="0" fgColor="FFCAB0" />
|
||||
<WidgetStyle name="Active tab text" styleID="0" fgColor="000000" />
|
||||
<WidgetStyle name="Inactive tabs" styleID="0" fgColor="808080" bgColor="C0C0C0" />
|
||||
<WidgetStyle name="Unsaved change marker" styleID="0" bgColor="FEE389" />
|
||||
<WidgetStyle name="Saved change marker" styleID="0" bgColor="A4FFB1" />
|
||||
</GlobalStyles>
|
||||
</NotepadPlus>
|
||||
|
@ -238,7 +238,7 @@ static char * bookmark_xpm[] = {
|
||||
" r*@s(tut(s@*r ",
|
||||
" v*w{x&x{w*v ",
|
||||
" l*yyy*l "};
|
||||
|
||||
/*
|
||||
static char * modifUnsaved_xpm[] = {
|
||||
"6 18 2 1",
|
||||
"z c #FF8000",
|
||||
@ -284,3 +284,4 @@ static char * modifSaved_xpm[] = {
|
||||
"ozozoz",
|
||||
"zozozo",
|
||||
"ozozoz"};
|
||||
*/
|
@ -107,7 +107,7 @@
|
||||
#define SCLEX_AUTOMATIC 1000
|
||||
|
||||
//For All lexer
|
||||
#define SCE_UNIVERSAL_SELECT_STYLE 30
|
||||
//#define SCE_UNIVERSAL_SELECT_STYLE 30
|
||||
#define SCE_UNIVERSAL_FOUND_STYLE 31
|
||||
#define SCE_UNIVERSAL_FOUND_STYLE_2 29
|
||||
#define SCE_UNIVERSAL_FOUND_STYLE_INC 28
|
||||
|
Loading…
x
Reference in New Issue
Block a user