[BUG_FIXED] improve the recognition of tag name.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@261 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
6ecf551326
commit
b2a99264f4
|
@ -1,26 +1,27 @@
|
||||||
Notepad++ v5 Beta fixed bugs and added features (from v4.9.2) :
|
Notepad++ v5 fixed bugs and added features (from v4.9.2) :
|
||||||
|
|
||||||
1. Improve Notepad++ performance - on startup and on exit.
|
1. Improve Notepad++ performance - on startup and on exit.
|
||||||
2. Add Calltip capacity.
|
2. Add Calltip capacity.
|
||||||
3. All the menu commands can be added in context menu, including plugins' commands, macros and user defined commands.
|
3. Add HTML/XML tag match highlighting.
|
||||||
4. Add bookmarked lines operations : delete all marked lines, copy all marked lines into clipboard, cut all marked lines into clipboard, paste from clipboard to replace all marked lines content.
|
4. All the menu commands can be added in context menu, including plugins' commands, macros and user defined commands.
|
||||||
5. Fix crash bug : Open files with date pre-1970.
|
5. Add bookmarked lines operations : delete all marked lines, copy all marked lines into clipboard, cut all marked lines into clipboard, paste from clipboard to replace all marked lines content.
|
||||||
6. Fix clone mode bug : now the actions done in one view will be synchronized in the cloned view.
|
6. Fix crash bug : Open files with date pre-1970.
|
||||||
7. Add tooltips in document tab to display the full file name path.
|
7. Fix clone mode bug : now the actions done in one view will be synchronized in the cloned view.
|
||||||
8. Change hide lines behaviour : Hide lines now saved during switches.
|
8. Add tooltips in document tab to display the full file name path.
|
||||||
9. Change file history list behaviour : Most recent closed file is on the top. Add number on list.
|
9. Change hide lines behaviour : Hide lines now saved during switches.
|
||||||
10. Caret width and blink rate are customizable.
|
10. Change file history list behaviour : Most recent closed file is on the top. Add number on list.
|
||||||
11. Add asterisk in title bar if file is dirty.
|
11. Caret width and blink rate are customizable.
|
||||||
12. The bookmarks' look & feel are improved.
|
12. Add asterisk in title bar if file is dirty.
|
||||||
13. Add "Select all" and "copy" context menu items in Find in files results window.
|
13. The bookmarks' look & feel are improved.
|
||||||
14. Fix goto line with command line bug.
|
14. Add "Select all" and "copy" context menu items in Find in files results window.
|
||||||
15. Improve smart highlight / mark all / incremental search highlight all visibility
|
15. Fix goto line with command line bug.
|
||||||
16. Tabbar's coulours is configurable via Stylers Configurator(Active tab Text, Inactive tab text, Inactive tab background, Active tab focused indicator and Active tab unfocused indicator).
|
16. Improve smart highlight / mark all / incremental search highlight all visibility
|
||||||
17. Add the smart highlight file size limit - 1.5 MB in order to improve the performance.
|
17. Tabbar's coulours is configurable via Stylers Configurator(Active tab Text, Inactive tab text, Inactive tab background, Active tab focused indicator and Active tab unfocused indicator).
|
||||||
18. Add exception handling (dumping filedata).
|
18. Add the smart highlight file size limit - 1.5 MB in order to improve the performance.
|
||||||
19. Fix go to line command line bug.
|
19. Add exception handling (dumping filedata).
|
||||||
20. Enhance Find in files and Find in all opened files features' performance.
|
20. Fix go to line command line bug.
|
||||||
21. Fix dialog off screen problem under multi-monitor environment.
|
21. Enhance Find in files and Find in all opened files features' performance.
|
||||||
|
22. Fix dialog off screen problem under multi-monitor environment.
|
||||||
|
|
||||||
Included plugins :
|
Included plugins :
|
||||||
|
|
||||||
|
|
|
@ -2181,7 +2181,6 @@ BOOL Notepad_plus::notify(SCNotification *notification)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
case SCN_HOTSPOTDOUBLECLICK :
|
case SCN_HOTSPOTDOUBLECLICK :
|
||||||
{
|
{
|
||||||
notifyView->execute(SCI_SETWORDCHARS, 0, (LPARAM)"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-+.:?&@=/%#");
|
notifyView->execute(SCI_SETWORDCHARS, 0, (LPARAM)"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-+.:?&@=/%#");
|
||||||
|
@ -2389,12 +2388,16 @@ bool Notepad_plus::getXmlMatchedTagsPos(XmlMatchedTagsPos & tagsPos)
|
||||||
// determinate the nature of current word : tagOpen, tagClose or outOfTag
|
// determinate the nature of current word : tagOpen, tagClose or outOfTag
|
||||||
TagCateg tagCateg = getTagCategory(tagsPos, caretPos);
|
TagCateg tagCateg = getTagCategory(tagsPos, caretPos);
|
||||||
|
|
||||||
|
static const char tagNameChars[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_:";
|
||||||
|
|
||||||
switch (tagCateg)
|
switch (tagCateg)
|
||||||
{
|
{
|
||||||
case tagOpen : // if tagOpen search right
|
case tagOpen : // if tagOpen search right
|
||||||
{
|
{
|
||||||
|
_pEditView->execute(SCI_SETWORDCHARS, 0, (LPARAM)tagNameChars);
|
||||||
int startPos = _pEditView->execute(SCI_WORDSTARTPOSITION, tagsPos.tagOpenStart+1, true);
|
int startPos = _pEditView->execute(SCI_WORDSTARTPOSITION, tagsPos.tagOpenStart+1, true);
|
||||||
int endPos = _pEditView->execute(SCI_WORDENDPOSITION, tagsPos.tagOpenStart+1, true);
|
int endPos = _pEditView->execute(SCI_WORDENDPOSITION, tagsPos.tagOpenStart+1, true);
|
||||||
|
_pEditView->execute(SCI_SETCHARSDEFAULT);
|
||||||
char * tagName = new char[endPos-startPos+1];
|
char * tagName = new char[endPos-startPos+1];
|
||||||
|
|
||||||
_pEditView->getText(tagName, startPos, endPos);
|
_pEditView->getText(tagName, startPos, endPos);
|
||||||
|
@ -2432,8 +2435,11 @@ bool Notepad_plus::getXmlMatchedTagsPos(XmlMatchedTagsPos & tagsPos)
|
||||||
|
|
||||||
case tagClose : // if tagClose search left
|
case tagClose : // if tagClose search left
|
||||||
{
|
{
|
||||||
|
_pEditView->execute(SCI_SETWORDCHARS, 0, (LPARAM)tagNameChars);
|
||||||
int startPos = _pEditView->execute(SCI_WORDSTARTPOSITION, tagsPos.tagCloseStart+2, true);
|
int startPos = _pEditView->execute(SCI_WORDSTARTPOSITION, tagsPos.tagCloseStart+2, true);
|
||||||
int endPos = _pEditView->execute(SCI_WORDENDPOSITION, tagsPos.tagCloseStart+2, true);
|
int endPos = _pEditView->execute(SCI_WORDENDPOSITION, tagsPos.tagCloseStart+2, true);
|
||||||
|
_pEditView->execute(SCI_SETCHARSDEFAULT);
|
||||||
|
|
||||||
char * tagName = new char[endPos-startPos+1];
|
char * tagName = new char[endPos-startPos+1];
|
||||||
|
|
||||||
_pEditView->getText(tagName, startPos, endPos);
|
_pEditView->getText(tagName, startPos, endPos);
|
||||||
|
@ -2465,7 +2471,7 @@ bool Notepad_plus::getXmlMatchedTagsPos(XmlMatchedTagsPos & tagsPos)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
caretPos = foundPos.first;
|
caretPos = foundPos.first;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue