mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-25 23:05:13 +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 the application name
|
||||||
!define APPNAME "Notepad++"
|
!define APPNAME "Notepad++"
|
||||||
!define APPVERSION "5.2"
|
!define APPVERSION "5.3"
|
||||||
!define APPNAMEANDVERSION "Notepad++ v5.2"
|
!define APPNAMEANDVERSION "Notepad++ v5.3"
|
||||||
!define APPWEBSITE "http://notepad-plus.sourceforge.net/"
|
!define APPWEBSITE "http://notepad-plus.sourceforge.net/"
|
||||||
|
|
||||||
!define VERSION_MAJOR 5
|
!define VERSION_MAJOR 5
|
||||||
!define VERSION_MINOR 2
|
!define VERSION_MINOR 3
|
||||||
|
|
||||||
; Main Install settings
|
; Main Install settings
|
||||||
Name "${APPNAMEANDVERSION}"
|
Name "${APPNAMEANDVERSION}"
|
||||||
InstallDir "$PROGRAMFILES\Notepad++"
|
InstallDir "$PROGRAMFILES\Notepad++"
|
||||||
InstallDirRegKey HKLM "Software\${APPNAME}" ""
|
InstallDirRegKey HKLM "Software\${APPNAME}" ""
|
||||||
OutFile "..\bin\npp.5.2.Installer.exe"
|
OutFile "..\bin\npp.5.3.Installer.exe"
|
||||||
|
|
||||||
; GetWindowsVersion
|
; GetWindowsVersion
|
||||||
;
|
;
|
||||||
@ -430,6 +430,11 @@ GLOBAL_INST:
|
|||||||
IfFileExists "$INSTDIR\plugins\NppAutoIndent.dll" 0 +3
|
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."
|
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"
|
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
|
; detect the right of
|
||||||
UserInfo::GetAccountType
|
UserInfo::GetAccountType
|
||||||
Pop $1
|
Pop $1
|
||||||
@ -557,6 +562,10 @@ SubSection "Auto-completion Files" autoCompletionComponent
|
|||||||
File "..\bin\plugins\APIs\nsis.xml"
|
File "..\bin\plugins\APIs\nsis.xml"
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
|
Section AWK
|
||||||
|
SetOutPath "$INSTDIR\plugins\APIs"
|
||||||
|
File "..\bin\plugins\APIs\awk.xml"
|
||||||
|
SectionEnd
|
||||||
SubSectionEnd
|
SubSectionEnd
|
||||||
|
|
||||||
SubSection "Plugins" Plugins
|
SubSection "Plugins" Plugins
|
||||||
@ -622,14 +631,14 @@ SubSection "Plugins" Plugins
|
|||||||
SetOutPath "$INSTDIR\plugins"
|
SetOutPath "$INSTDIR\plugins"
|
||||||
File "..\bin\plugins\NppExport.dll"
|
File "..\bin\plugins\NppExport.dll"
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
/*
|
||||||
Section "ComparePlugin" ComparePlugin
|
Section "ComparePlugin" ComparePlugin
|
||||||
Delete "$INSTDIR\plugins\ComparePlugin.dll"
|
Delete "$INSTDIR\plugins\ComparePlugin.dll"
|
||||||
SetOutPath "$INSTDIR\plugins"
|
SetOutPath "$INSTDIR\plugins"
|
||||||
File "..\bin\plugins\ComparePlugin.dll"
|
File "..\bin\plugins\ComparePlugin.dll"
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
/*
|
|
||||||
Section "NppAutoIndent" NppAutoIndent
|
Section "NppAutoIndent" NppAutoIndent
|
||||||
Delete "$INSTDIR\plugins\NppAutoIndent.dll"
|
Delete "$INSTDIR\plugins\NppAutoIndent.dll"
|
||||||
SetOutPath "$INSTDIR\plugins"
|
SetOutPath "$INSTDIR\plugins"
|
||||||
@ -798,6 +807,12 @@ SubSection un.autoCompletionComponent
|
|||||||
Delete "$INSTDIR\plugins\APIs\nsis.xml"
|
Delete "$INSTDIR\plugins\APIs\nsis.xml"
|
||||||
RMDir "$INSTDIR\plugins\APIs\"
|
RMDir "$INSTDIR\plugins\APIs\"
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
|
Section un.AWK
|
||||||
|
Delete "$INSTDIR\plugins\APIs\awk.xml"
|
||||||
|
RMDir "$INSTDIR\plugins\APIs\"
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
SubSectionEnd
|
SubSectionEnd
|
||||||
|
|
||||||
SubSection un.Plugins
|
SubSection un.Plugins
|
||||||
|
@ -2033,7 +2033,6 @@ BOOL Notepad_plus::notify(SCNotification *notification)
|
|||||||
TBHDR * tabNotification = (TBHDR*) notification;
|
TBHDR * tabNotification = (TBHDR*) notification;
|
||||||
switch (notification->nmhdr.code)
|
switch (notification->nmhdr.code)
|
||||||
{
|
{
|
||||||
|
|
||||||
case SCN_MODIFIED:
|
case SCN_MODIFIED:
|
||||||
{
|
{
|
||||||
static bool prevWasEdit = false;
|
static bool prevWasEdit = false;
|
||||||
@ -2058,7 +2057,7 @@ BOOL Notepad_plus::notify(SCNotification *notification)
|
|||||||
prevWasEdit = false;
|
prevWasEdit = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_isFileOpening /*&& _pEditView->hasMarginShowed(ScintillaEditView::_SC_MARGE_MODIFMARKER)*/)
|
if (!_isFileOpening && (isFromPrimary || isFromSecondary))
|
||||||
{
|
{
|
||||||
bool isProcessed = false;
|
bool isProcessed = false;
|
||||||
|
|
||||||
|
@ -161,9 +161,8 @@ void ScintillaEditView::init(HINSTANCE hInst, HWND hPere)
|
|||||||
execute(SCI_SETMARGINTYPEN, _SC_MARGE_MODIFMARKER, SC_MARGIN_BACK);
|
execute(SCI_SETMARGINTYPEN, _SC_MARGE_MODIFMARKER, SC_MARGIN_BACK);
|
||||||
showMargin(_SC_MARGE_MODIFMARKER, true);
|
showMargin(_SC_MARGE_MODIFMARKER, true);
|
||||||
|
|
||||||
execute(SCI_MARKERSETFORE, MARK_LINEMODIFIEDUNSAVED, (LPARAM)red);
|
execute(SCI_MARKERDEFINE, MARK_LINEMODIFIEDSAVED, SCI_MARKERDEFINE);
|
||||||
execute(SCI_MARKERDEFINEPIXMAP, MARK_LINEMODIFIEDUNSAVED, (LPARAM)modifUnsaved_xpm);
|
execute(SCI_MARKERDEFINE, MARK_LINEMODIFIEDUNSAVED, SCI_MARKERDEFINE);
|
||||||
execute(SCI_MARKERDEFINEPIXMAP, MARK_LINEMODIFIEDSAVED, (LPARAM)modifSaved_xpm);
|
|
||||||
|
|
||||||
execute(SCI_MARKERSETALPHA, MARK_BOOKMARK, 70);
|
execute(SCI_MARKERSETALPHA, MARK_BOOKMARK, 70);
|
||||||
execute(SCI_MARKERDEFINEPIXMAP, MARK_BOOKMARK, (LPARAM)bookmark_xpm);
|
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);
|
return _callWindowProc(_scintillaDefaultProc, hwnd, Message, wParam, lParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScintillaEditView::setSpecialIndicator(Style & styleToSet)
|
|
||||||
{
|
|
||||||
execute(SCI_INDICSETFORE, styleToSet._styleID, styleToSet._bgColor);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void ScintillaEditView::setSpecialStyle(Style & styleToSet)
|
void ScintillaEditView::setSpecialStyle(Style & styleToSet)
|
||||||
{
|
{
|
||||||
@ -927,48 +921,66 @@ void ScintillaEditView::defineDocType(LangType typeDoc)
|
|||||||
execute(SCI_STYLECLEARALL);
|
execute(SCI_STYLECLEARALL);
|
||||||
int oldBits = execute(SCI_GETSTYLEBITSNEEDED);
|
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);
|
int iFind = stylers.getStylerIndexByID(SCE_UNIVERSAL_FOUND_STYLE);
|
||||||
if (iFind != -1)
|
if (iFind != -1)
|
||||||
{
|
{
|
||||||
Style & styleFind = stylers.getStyler(iFind);
|
pStyle = &(stylers.getStyler(iFind));
|
||||||
setSpecialIndicator(styleFind);
|
|
||||||
}
|
}
|
||||||
|
setSpecialIndicator(*pStyle);
|
||||||
|
|
||||||
|
defaultIndicatorStyle._styleID = SCE_UNIVERSAL_FOUND_STYLE_2;
|
||||||
|
defaultIndicatorStyle._bgColor = liteGreen;
|
||||||
|
pStyle = &defaultIndicatorStyle;
|
||||||
iFind = stylers.getStylerIndexByID(SCE_UNIVERSAL_FOUND_STYLE_2);
|
iFind = stylers.getStylerIndexByID(SCE_UNIVERSAL_FOUND_STYLE_2);
|
||||||
if (iFind != -1)
|
if (iFind != -1)
|
||||||
{
|
{
|
||||||
Style & styleFind = stylers.getStyler(iFind);
|
pStyle = &(stylers.getStyler(iFind));
|
||||||
setSpecialIndicator(styleFind);
|
|
||||||
}
|
}
|
||||||
|
setSpecialIndicator(*pStyle);
|
||||||
|
|
||||||
|
defaultIndicatorStyle._styleID = SCE_UNIVERSAL_FOUND_STYLE_INC;
|
||||||
|
defaultIndicatorStyle._bgColor = blue;
|
||||||
|
pStyle = &defaultIndicatorStyle;
|
||||||
iFind = stylers.getStylerIndexByID(SCE_UNIVERSAL_FOUND_STYLE_INC);
|
iFind = stylers.getStylerIndexByID(SCE_UNIVERSAL_FOUND_STYLE_INC);
|
||||||
if (iFind != -1)
|
if (iFind != -1)
|
||||||
{
|
{
|
||||||
Style & styleFind = stylers.getStyler(iFind);
|
pStyle = &(stylers.getStyler(iFind));
|
||||||
setSpecialIndicator(styleFind);
|
|
||||||
}
|
}
|
||||||
|
setSpecialIndicator(*pStyle);
|
||||||
|
|
||||||
|
defaultIndicatorStyle._styleID = SCE_UNIVERSAL_TAGMATCH;
|
||||||
|
defaultIndicatorStyle._bgColor = RGB(0x00, 0x80, 0xFF);
|
||||||
|
pStyle = &defaultIndicatorStyle;
|
||||||
iFind = stylers.getStylerIndexByID(SCE_UNIVERSAL_TAGMATCH);
|
iFind = stylers.getStylerIndexByID(SCE_UNIVERSAL_TAGMATCH);
|
||||||
if (iFind != -1)
|
if (iFind != -1)
|
||||||
{
|
{
|
||||||
Style & styleFind = stylers.getStyler(iFind);
|
pStyle = &(stylers.getStyler(iFind));
|
||||||
setSpecialIndicator(styleFind);
|
|
||||||
}
|
}
|
||||||
|
setSpecialIndicator(*pStyle);
|
||||||
|
|
||||||
|
defaultIndicatorStyle._styleID = SCE_UNIVERSAL_TAGATTR;
|
||||||
|
defaultIndicatorStyle._bgColor = yellow;
|
||||||
|
pStyle = &defaultIndicatorStyle;
|
||||||
iFind = stylers.getStylerIndexByID(SCE_UNIVERSAL_TAGATTR);
|
iFind = stylers.getStylerIndexByID(SCE_UNIVERSAL_TAGATTR);
|
||||||
if (iFind != -1)
|
if (iFind != -1)
|
||||||
{
|
{
|
||||||
Style & styleFind = stylers.getStyler(iFind);
|
pStyle = &(stylers.getStyler(iFind));
|
||||||
setSpecialIndicator(styleFind);
|
|
||||||
}
|
}
|
||||||
|
setSpecialIndicator(*pStyle);
|
||||||
|
/*
|
||||||
iFind = stylers.getStylerIndexByID(SCE_UNIVERSAL_SELECT_STYLE);
|
iFind = stylers.getStylerIndexByID(SCE_UNIVERSAL_SELECT_STYLE);
|
||||||
if (iFind != -1)
|
if (iFind != -1)
|
||||||
{
|
{
|
||||||
Style & styleFind = stylers.getStyler(iFind);
|
Style & styleFind = stylers.getStyler(iFind);
|
||||||
setSpecialStyle(styleFind);
|
setSpecialStyle(styleFind);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
int caretWidth = 1;
|
int caretWidth = 1;
|
||||||
|
|
||||||
|
|
||||||
@ -1777,8 +1789,8 @@ void ScintillaEditView::performGlobalStyles()
|
|||||||
{
|
{
|
||||||
Style & style = stylers.getStyler(i);
|
Style & style = stylers.getStyler(i);
|
||||||
selectColorBack = style._bgColor;
|
selectColorBack = style._bgColor;
|
||||||
execute(SCI_SETSELBACK, 1, selectColorBack);
|
|
||||||
}
|
}
|
||||||
|
execute(SCI_SETSELBACK, 1, selectColorBack);
|
||||||
|
|
||||||
COLORREF caretColor = black;
|
COLORREF caretColor = black;
|
||||||
i = stylers.getStylerIndexByID(SCI_SETCARETFORE);
|
i = stylers.getStylerIndexByID(SCI_SETCARETFORE);
|
||||||
@ -1823,6 +1835,24 @@ void ScintillaEditView::performGlobalStyles()
|
|||||||
for (int j = 0 ; j < NB_FOLDER_STATE ; j++)
|
for (int j = 0 ; j < NB_FOLDER_STATE ; j++)
|
||||||
defineMarker(_markersArray[FOLDER_TYPE][j], _markersArray[_folderStyle][j], foldfgColor, foldbgColor);
|
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;
|
COLORREF wsSymbolFgColor = black;
|
||||||
i = stylers.getStylerIndexByName(TEXT("White space symbol"));
|
i = stylers.getStylerIndexByName(TEXT("White space symbol"));
|
||||||
if (i != -1)
|
if (i != -1)
|
||||||
|
@ -592,7 +592,10 @@ protected:
|
|||||||
inline void makeStyle(LangType langType, const TCHAR **keywordArray = NULL);
|
inline void makeStyle(LangType langType, const TCHAR **keywordArray = NULL);
|
||||||
void setStyle(Style styleToSet); //NOT by reference (style edited)
|
void setStyle(Style styleToSet); //NOT by reference (style edited)
|
||||||
void setSpecialStyle(Style & styleToSet); //by reference
|
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)
|
//Complex lexers (same lexer, different language)
|
||||||
void setXmlLexer(LangType type);
|
void setXmlLexer(LangType type);
|
||||||
void setCppLexer(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 darkGreen = RGB(0, 0x80, 0);
|
||||||
const COLORREF liteGreen = RGB(0, 0xFF, 0);
|
const COLORREF liteGreen = RGB(0, 0xFF, 0);
|
||||||
const COLORREF blueGreen = RGB(0, 0x80, 0x80);
|
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 liteBlue = RGB(0xA6, 0xCA, 0xF0);
|
||||||
const COLORREF veryLiteBlue = RGB(0xC4, 0xF9, 0xFD);
|
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 unfocused indicator" styleID="0" fgColor="FFCAB0" />
|
||||||
<WidgetStyle name="Active tab text" styleID="0" fgColor="000000" />
|
<WidgetStyle name="Active tab text" styleID="0" fgColor="000000" />
|
||||||
<WidgetStyle name="Inactive tabs" styleID="0" fgColor="808080" bgColor="C0C0C0" />
|
<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>
|
</GlobalStyles>
|
||||||
</NotepadPlus>
|
</NotepadPlus>
|
||||||
|
@ -238,7 +238,7 @@ static char * bookmark_xpm[] = {
|
|||||||
" r*@s(tut(s@*r ",
|
" r*@s(tut(s@*r ",
|
||||||
" v*w{x&x{w*v ",
|
" v*w{x&x{w*v ",
|
||||||
" l*yyy*l "};
|
" l*yyy*l "};
|
||||||
|
/*
|
||||||
static char * modifUnsaved_xpm[] = {
|
static char * modifUnsaved_xpm[] = {
|
||||||
"6 18 2 1",
|
"6 18 2 1",
|
||||||
"z c #FF8000",
|
"z c #FF8000",
|
||||||
@ -284,3 +284,4 @@ static char * modifSaved_xpm[] = {
|
|||||||
"ozozoz",
|
"ozozoz",
|
||||||
"zozozo",
|
"zozozo",
|
||||||
"ozozoz"};
|
"ozozoz"};
|
||||||
|
*/
|
@ -107,7 +107,7 @@
|
|||||||
#define SCLEX_AUTOMATIC 1000
|
#define SCLEX_AUTOMATIC 1000
|
||||||
|
|
||||||
//For All lexer
|
//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 31
|
||||||
#define SCE_UNIVERSAL_FOUND_STYLE_2 29
|
#define SCE_UNIVERSAL_FOUND_STYLE_2 29
|
||||||
#define SCE_UNIVERSAL_FOUND_STYLE_INC 28
|
#define SCE_UNIVERSAL_FOUND_STYLE_INC 28
|
||||||
|
Loading…
x
Reference in New Issue
Block a user