[NEW_FEATURE] Add the ability of tag match feature to not highlight comment zone in html/xml.
[BUG_FIXED] Fix TCL language highlighting bug. [NEW_RELEASE] v5.4 released. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@478 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
e4975230a4
commit
c3da0f775f
|
@ -5,10 +5,10 @@ Notepad++ v5.4 new features and fixed bugs (from v5.3.1) :
|
|||
3. Add Mark all extension : user can mark any occurrence with 5 different colours.
|
||||
4. Add new feature : column selection allows to insertion a string by typing characters in sequence (w/o column mode editor).
|
||||
5. Detect UTF16 encoding (BE and LE) w/o BOM.
|
||||
6. Iixed crash bug : Double click a file associated with an older version of Notepad++ while a newer version of Notepad++ instance is running.
|
||||
6. Fix crash bug : Double click a file associated with an older version of Notepad++ while a newer version of Notepad++ instance is running.
|
||||
7. lmprove main menu structure (more compact). Language Menu can be compacted as well (optional, in Preference dialog).
|
||||
8. Fine numbers margin width is changed dynamically according to the needed space (but keeping at least 3 digits).
|
||||
9. ile history list (under the File menu) is limited to 100 characters per item. Longer file names are fitted to 100 characters by replacing path components with ellipses.
|
||||
9. File history list (under the File menu) is limited to 100 characters per item. Longer file names are fitted to 100 characters by replacing path components with ellipses.
|
||||
10. Update Scintilla from v1.75 to v1.77.
|
||||
11. Indent guideline can be shown w/o whitespace or tab symbol.
|
||||
12. Fixed two bugs when calculating the width of the TaskList (document list when pressing ctrl+tab or right-click + mouse wheel.
|
||||
|
@ -20,7 +20,13 @@ Notepad++ v5.4 new features and fixed bugs (from v5.3.1) :
|
|||
18. Fix the Mark all in selection bug (while Find Replace Dialog loosing the focus).
|
||||
19. Add 2 plugins messages : NPPN_FILEBEFORELOAD and NPPN_FILELOADFAILED.
|
||||
20. Fix New document not be switched while double clicking in Find in files result panel.
|
||||
21. Fix conversion min to Maj and Maj to min (or vice et versa) in column selection bug.
|
||||
21. Fix conversion min to Maj and Maj to min (or vice et versa) in column selection bug.
|
||||
22. Fix bug when the find dialog was closed the translucaent shadow remained in Windows 7.
|
||||
23. Fix crash bug of find in files feature.
|
||||
24. Add "follow current doc" checkbox in Find in file dialog.
|
||||
25. Add the ability of tag match feature to not highlight comment zone in html/xml.
|
||||
26. Fix TCL language highlighting bug.
|
||||
|
||||
|
||||
|
||||
Included plugins (Unicode):
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -342,7 +342,8 @@ GLOBAL_INST:
|
|||
SetOutPath "$TEMP\"
|
||||
File "langsModel.xml"
|
||||
File "configModel.xml"
|
||||
File "stylesModel.xml"
|
||||
File "stylesGlobalModel.xml"
|
||||
File "stylesLexerModel.xml"
|
||||
|
||||
File "..\bin\langs.model.xml"
|
||||
File "..\bin\config.model.xml"
|
||||
|
@ -352,8 +353,13 @@ GLOBAL_INST:
|
|||
;UPGRATE $INSTDIR\langs.xml
|
||||
nsExec::ExecToStack '"$TEMP\xmlUpdater.exe" "$TEMP\langsModel.xml" "$TEMP\langs.model.xml" "$INSTDIR\langs.xml"'
|
||||
nsExec::ExecToStack '"$TEMP\xmlUpdater.exe" "$TEMP\configModel.xml" "$TEMP\config.model.xml" "$UPDATE_PATH\config.xml"'
|
||||
nsExec::ExecToStack '"$TEMP\xmlUpdater.exe" "$TEMP\stylesModel.xml" "$TEMP\stylers_remove.xml" "$UPDATE_PATH\stylers.xml"'
|
||||
nsExec::ExecToStack '"$TEMP\xmlUpdater.exe" "$TEMP\stylesModel.xml" "$TEMP\stylers.model.xml" "$UPDATE_PATH\stylers.xml"'
|
||||
|
||||
nsExec::ExecToStack '"$TEMP\xmlUpdater.exe" "$TEMP\stylesGlobalModel.xml" "$TEMP\stylers.model.xml" "$UPDATE_PATH\stylers.xml"'
|
||||
nsExec::ExecToStack '"$TEMP\xmlUpdater.exe" "$TEMP\stylesLexerModel.xml" "$TEMP\stylers_remove.xml" "$UPDATE_PATH\stylers.xml"'
|
||||
nsExec::ExecToStack '"$TEMP\xmlUpdater.exe" "$TEMP\stylesLexerModel.xml" "$TEMP\stylers.model.xml" "$UPDATE_PATH\stylers.xml"'
|
||||
|
||||
; This line is added due to the bug of xmlUpdater, to be removed in the feature
|
||||
nsExec::ExecToStack '"$TEMP\xmlUpdater.exe" "$TEMP\stylesLexerModel.xml" "$TEMP\stylers.model.xml" "$UPDATE_PATH\stylers.xml"'
|
||||
|
||||
SetOutPath "$INSTDIR\"
|
||||
File "..\bin\langs.model.xml"
|
||||
|
@ -999,22 +1005,22 @@ SubSection un.Themes
|
|||
SectionEnd
|
||||
|
||||
Section un.PlasticCodeWrap
|
||||
Delete $INSTDIR\themes\Plastic Code Wrap.xml"
|
||||
Delete "$INSTDIR\themes\Plastic Code Wrap.xml"
|
||||
RMDir "$INSTDIR\themes\"
|
||||
SectionEnd
|
||||
|
||||
Section un.RubyBlue
|
||||
Delete $INSTDIR\themes\Ruby Blue.xml"
|
||||
Delete "$INSTDIR\themes\Ruby Blue.xml"
|
||||
RMDir "$INSTDIR\themes\"
|
||||
SectionEnd
|
||||
|
||||
Section un.Twilight
|
||||
Delete $INSTDIR\themes\Twilight.xml"
|
||||
Delete "$INSTDIR\themes\Twilight.xml"
|
||||
RMDir "$INSTDIR\themes\"
|
||||
SectionEnd
|
||||
|
||||
Section un.VibrantInk
|
||||
Delete $INSTDIR\themes\Vibrant Ink.xml"
|
||||
Delete "$INSTDIR\themes\Vibrant Ink.xml"
|
||||
RMDir "$INSTDIR\themes\"
|
||||
SectionEnd
|
||||
SubSectionEnd
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
<?xml version="1.0" encoding="Windows-1252" ?>
|
||||
<Node nodeName="NotepadPlus">
|
||||
<Node nodeName="LexerStyles">
|
||||
<Node nodeName="LexerType" name="name"/>
|
||||
<Node nodeName="LexerType" name="name">
|
||||
<Node nodeName="WordsStyle" name="name"/>
|
||||
</Node>
|
||||
</Node>
|
||||
</Node>
|
||||
|
||||
|
|
|
@ -659,18 +659,22 @@ BOOL CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lP
|
|||
CharacterRange cr = (*_ppEditView)->getSelection();
|
||||
int nbSelected = cr.cpMax - cr.cpMin;
|
||||
|
||||
int checkVal;
|
||||
if (nbSelected <= 1024)
|
||||
_isInSelection = isCheckedOrNot(IDC_IN_SELECTION_CHECK)?1:0;
|
||||
int checkVal = _isInSelection?BST_CHECKED:BST_UNCHECKED;
|
||||
|
||||
if (!_isInSelection)
|
||||
{
|
||||
checkVal = BST_UNCHECKED;
|
||||
_isInSelection = false;
|
||||
if (nbSelected <= 1024)
|
||||
{
|
||||
checkVal = BST_UNCHECKED;
|
||||
_isInSelection = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
checkVal = BST_CHECKED;
|
||||
_isInSelection = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
checkVal = BST_CHECKED;
|
||||
_isInSelection = true;
|
||||
}
|
||||
|
||||
// Searching/replacing in column selection is not allowed
|
||||
if ((*_ppEditView)->execute(SCI_GETSELECTIONMODE) == SC_SEL_RECTANGLE)
|
||||
{
|
||||
|
@ -985,7 +989,7 @@ BOOL CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lP
|
|||
|
||||
case IDC_IN_SELECTION_CHECK :
|
||||
{
|
||||
if (_currentStatus == REPLACE_DLG)
|
||||
if (_currentStatus <= REPLACE_DLG)
|
||||
_isInSelection = isCheckedOrNot(IDC_IN_SELECTION_CHECK);
|
||||
}
|
||||
return TRUE;
|
||||
|
|
|
@ -744,6 +744,45 @@ void ScintillaEditView::setCppLexer(LangType langType)
|
|||
|
||||
}
|
||||
|
||||
void ScintillaEditView::setTclLexer()
|
||||
{
|
||||
const char *tclInstrs;
|
||||
const char *tclTypes;
|
||||
|
||||
|
||||
execute(SCI_SETLEXER, SCLEX_TCL);
|
||||
|
||||
const TCHAR *pKwArray[10] = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
|
||||
makeStyle(L_TCL, pKwArray);
|
||||
|
||||
basic_string<char> keywordListInstruction("");
|
||||
basic_string<char> keywordListType("");
|
||||
if (pKwArray[LANG_INDEX_INSTR])
|
||||
{
|
||||
#ifdef UNICODE
|
||||
basic_string<wchar_t> kwlW = pKwArray[LANG_INDEX_INSTR];
|
||||
keywordListInstruction = wstring2string(kwlW, CP_ACP);
|
||||
#else
|
||||
keywordListInstruction = pKwArray[LANG_INDEX_INSTR];
|
||||
#endif
|
||||
}
|
||||
tclInstrs = getCompleteKeywordList(keywordListInstruction, L_TCL, LANG_INDEX_INSTR);
|
||||
|
||||
if (pKwArray[LANG_INDEX_TYPE])
|
||||
{
|
||||
#ifdef UNICODE
|
||||
basic_string<wchar_t> kwlW = pKwArray[LANG_INDEX_TYPE];
|
||||
keywordListType = wstring2string(kwlW, CP_ACP);
|
||||
#else
|
||||
keywordListType = pKwArray[LANG_INDEX_TYPE];
|
||||
#endif
|
||||
}
|
||||
tclTypes = getCompleteKeywordList(keywordListType, L_TCL, LANG_INDEX_TYPE);
|
||||
|
||||
execute(SCI_SETKEYWORDS, 0, (LPARAM)tclInstrs);
|
||||
execute(SCI_SETKEYWORDS, 1, (LPARAM)tclTypes);
|
||||
}
|
||||
|
||||
//used by Objective-C and Actionscript
|
||||
void ScintillaEditView::setObjCLexer(LangType langType)
|
||||
{
|
||||
|
@ -1064,8 +1103,10 @@ void ScintillaEditView::defineDocType(LangType typeDoc)
|
|||
case L_JAVA :
|
||||
case L_RC :
|
||||
case L_CS :
|
||||
setCppLexer(typeDoc); break;
|
||||
|
||||
case L_TCL :
|
||||
setCppLexer(typeDoc); break;
|
||||
setTclLexer(); break;
|
||||
|
||||
case L_FLASH :
|
||||
case L_OBJC :
|
||||
|
|
|
@ -618,6 +618,7 @@ protected:
|
|||
//Complex lexers (same lexer, different language)
|
||||
void setXmlLexer(LangType type);
|
||||
void setCppLexer(LangType type);
|
||||
void setTclLexer();
|
||||
void setObjCLexer(LangType type);
|
||||
void setUserLexer(const TCHAR *userLangName = NULL);
|
||||
void setExternalLexer(LangType typeDoc);
|
||||
|
|
|
@ -118,7 +118,7 @@ bool XmlMatchedTagsHighlighter::getMatchedTagPos(int searchStart, int searchEnd,
|
|||
// if the tag is found in non html zone, we skip it
|
||||
const NppGUI & nppGUI = (NppParameters::getInstance())->getNppGUI();
|
||||
int idStyle = _pEditView->execute(SCI_GETSTYLEAT, ltPosOnR);
|
||||
if (idStyle >= SCE_HJ_START && !nppGUI._enableHiliteNonHTMLZone)
|
||||
if (!nppGUI._enableHiliteNonHTMLZone && (idStyle >= SCE_HJ_START || idStyle == SCE_H_COMMENT))
|
||||
{
|
||||
int start = (direction == search2Left)?foundPos.first:foundPos.second;
|
||||
int end = searchEnd;
|
||||
|
@ -259,10 +259,10 @@ bool XmlMatchedTagsHighlighter::getXmlMatchedTagsPos(XmlMatchedTagsPos & tagsPos
|
|||
// get word where caret is on
|
||||
int caretPos = _pEditView->execute(SCI_GETCURRENTPOS);
|
||||
|
||||
// if the tag is found in non html zone, then quit
|
||||
// if the tag is found in non html zone (include comment zone), then quit
|
||||
const NppGUI & nppGUI = (NppParameters::getInstance())->getNppGUI();
|
||||
int idStyle = _pEditView->execute(SCI_GETSTYLEAT, caretPos);
|
||||
if (!nppGUI._enableHiliteNonHTMLZone && idStyle >= SCE_HJ_START)
|
||||
if (!nppGUI._enableHiliteNonHTMLZone && (idStyle >= SCE_HJ_START || idStyle == SCE_H_COMMENT))
|
||||
return false;
|
||||
|
||||
int docLen = _pEditView->getCurrentDocLen();
|
||||
|
|
|
@ -125,7 +125,7 @@ BEGIN
|
|||
GROUPBOX "Highlight matching tags",IDC_TAGMATCHEDHILITE_STATIC,193,101,155,50,BS_CENTER
|
||||
CONTROL "Enable",IDC_CHECK_ENABLTAGSMATCHHILITE,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,201,111,140,10
|
||||
CONTROL "Highlight tag attributes",IDC_CHECK_ENABLTAGATTRHILITE,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,202,123,140,10
|
||||
CONTROL "Highlight php/asp zone",IDC_CHECK_HIGHLITENONEHTMLZONE, "Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,202,136,140,10
|
||||
CONTROL "Highlight comment/php/asp zone",IDC_CHECK_HIGHLITENONEHTMLZONE, "Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,202,136,140,10
|
||||
RTEXT "Session file ext:",IDC_SESSIONFILEEXT_STATIC,205,160,108,8
|
||||
EDITTEXT IDC_EDIT_SESSIONFILEEXT,315,157,34,14,ES_AUTOHSCROLL
|
||||
END
|
||||
|
|
|
@ -178,13 +178,13 @@ HINSTANCE Command::run(HWND hWnd)
|
|||
|
||||
extractArgs(cmdPure, args, _cmdLine.c_str());
|
||||
int nbTchar = ::ExpandEnvironmentStrings(cmdPure, cmdIntermediate, MAX_PATH);
|
||||
if (!nbChar)
|
||||
if (!nbTchar)
|
||||
lstrcpy(cmdIntermediate, cmdPure);
|
||||
else if (nbTchar >= MAX_PATH)
|
||||
cmdIntermediate[MAX_PATH-1] = '\0';
|
||||
|
||||
nbTchar = ::ExpandEnvironmentStrings(args, argsIntermediate, argsIntermediateLen);
|
||||
if (!nbChar)
|
||||
if (!nbTchar)
|
||||
lstrcpy(argsIntermediate, args);
|
||||
else if (nbTchar >= argsIntermediateLen)
|
||||
argsIntermediate[argsIntermediateLen-1] = '\0';
|
||||
|
|
|
@ -590,22 +590,22 @@
|
|||
<WordsStyle name="COMMENT LINE" styleID="2" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||
</LexerType>
|
||||
<LexerType name="tcl" desc="TCL" ext="">
|
||||
<WordsStyle name="PREPROCESSOR" styleID="9" fgColor="804000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||
<WordsStyle name="DEFAULT" styleID="11" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||
<WordsStyle name="INSTRUCTION WORD" styleID="5" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" keywordClass="instre1" />
|
||||
<WordsStyle name="TYPE WORD" styleID="16" fgColor="8000FF" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" keywordClass="type1" />
|
||||
<WordsStyle name="NUMBER" styleID="4" fgColor="FF8000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||
<WordsStyle name="STRING" styleID="6" fgColor="808080" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||
<WordsStyle name="CHARACTER" styleID="7" fgColor="808080" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||
<WordsStyle name="OPERATOR" styleID="10" fgColor="000080" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" />
|
||||
<WordsStyle name="VERBATIM" styleID="13" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||
<WordsStyle name="REGEX" styleID="14" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" />
|
||||
<WordsStyle name="DEFAULT" styleID="0" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||
<WordsStyle name="MODIFIER" styleID="10" fgColor="804000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||
<WordsStyle name="EXPAND" styleID="11" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||
<WordsStyle name="INSTRUCTION WORD" styleID="12" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" keywordClass="instre1" />
|
||||
<WordsStyle name="TYPE WORD" styleID="13" fgColor="8000FF" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" keywordClass="type1" />
|
||||
<WordsStyle name="NUMBER" styleID="3" fgColor="FF8000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||
<WordsStyle name="SUB BRACE" styleID="9" fgColor="808080" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||
<WordsStyle name="SUBSTITUTION" styleID="8" fgColor="808080" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||
<WordsStyle name="OPERATOR" styleID="6" fgColor="000080" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" />
|
||||
<WordsStyle name="IDENTIFIER" styleID="7" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||
<WordsStyle name="WORD IN QUOTE" styleID="4" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" />
|
||||
<WordsStyle name="IN QUOTE" styleID="5" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" />
|
||||
<WordsStyle name="COMMENT" styleID="1" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||
<WordsStyle name="COMMENT LINE" styleID="2" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||
<WordsStyle name="COMMENT DOC" styleID="3" fgColor="008080" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||
<WordsStyle name="COMMENT LINE DOC" styleID="15" fgColor="008080" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||
<WordsStyle name="COMMENT DOC KEYWORD" styleID="17" fgColor="008080" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" />
|
||||
<WordsStyle name="COMMENT DOC KEYWORD ERROR" styleID="18" fgColor="008080" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||
<WordsStyle name="COMMENT BOX" styleID="17" fgColor="008080" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" />
|
||||
<WordsStyle name="BLOCK COMMENT" styleID="18" fgColor="008080" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||
</LexerType>
|
||||
<LexerType name="tex" desc="TeX" ext="">
|
||||
<WordsStyle name="DEFAULT" styleID="0" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
|
||||
|
|
Loading…
Reference in New Issue