| CODENOTIFIER | HelpYou are not signed inSign in |
Project: Notepad++
Revision: 298
Author: donho
Date: 20 Jul 2008 21:39:28
Changes:[NEW] URL highlighter highlights only the current view, it highlights : http, https, ftp and malto.
Files:| ... | ...@@ -898,7 +898,7 @@ | |
| 898 | 898 | if (moveThumb) { |
| 899 | 899 | SetVerticalScrollPos(); |
| 900 | 900 | } |
| 901 | NotifyScrolled(); | |
| 901 | NotifyScrolled(true); | |
| 902 | 902 | } |
| 903 | 903 | } |
| 904 | 904 | |
| ... | ...@@ -917,7 +917,7 @@ | |
| 917 | 917 | RedrawRect(GetClientRectangle()); |
| 918 | 918 | } |
| 919 | 919 | |
| 920 | NotifyScrolled(); | |
| 920 | NotifyScrolled(false); | |
| 921 | 921 | } |
| 922 | 922 | |
| 923 | 923 | void Editor::MoveCaretInsideView(bool ensureVisible) { |
| ... | ...@@ -3717,9 +3717,10 @@ | |
| 3717 | 3717 | NotifyParent(scn); |
| 3718 | 3718 | } |
| 3719 | 3719 | |
| 3720 | void Editor::NotifyScrolled() { | |
| 3720 | void Editor::NotifyScrolled(bool vertical) { | |
| 3721 | 3721 | SCNotification scn = {0}; |
| 3722 | 3722 | scn.nmhdr.code = SCN_SCROLLED; |
| 3723 | scn.wParam = vertical; //true if vertical scrolling | |
| 3723 | 3724 | NotifyParent(scn); |
| 3724 | 3725 | } |
| 3725 | 3726 |
| ... | ...@@ -187,6 +187,11 @@ | |
| 187 | 187 | execute(SCI_INDICSETUNDER, SCE_UNIVERSAL_TAGMATCH, true); |
| 188 | 188 | execute(SCI_INDICSETUNDER, SCE_UNIVERSAL_TAGATTR, true); |
| 189 | 189 | |
| 190 | // URL highlighting | |
| 191 | int activeFG = 0xFF0000; | |
| 192 | execute(SCI_SETHOTSPOTACTIVEFORE, TRUE, activeFG); | |
| 193 | execute(SCI_SETHOTSPOTSINGLELINE, FALSE); | |
| 194 | ||
| 190 | 195 | _pParameter = NppParameters::getInstance(); |
| 191 | 196 | |
| 192 | 197 | _codepage = ::GetACP(); |
| ... | ...@@ -370,7 +370,7 @@ | |
| 370 | 370 | void NotifyHotSpotDoubleClicked(int position, bool shift, bool ctrl, bool alt); |
| 371 | 371 | void NotifyUpdateUI(); |
| 372 | 372 | void NotifyPainted(); |
| 373 | void NotifyScrolled(); | |
| 373 | void NotifyScrolled(bool vertical); | |
| 374 | 374 | void NotifyIndicatorClick(bool click, int position, bool shift, bool ctrl, bool alt); |
| 375 | 375 | bool NotifyMarginClick(Point pt, bool shift, bool ctrl, bool alt); |
| 376 | 376 | void NotifyNeedShown(int pos, int len); |
| ... | ...@@ -42,7 +42,6 @@ | |
| 42 | 42 | #include "xmlMatchedTagsHighlighter.h" |
| 43 | 43 | |
| 44 | 44 | const char Notepad_plus::_className[32] = NOTEPAD_PP_CLASS_NAME; |
| 45 | const char *urlHttpRegExpr = "http://[a-z0-9_\\-\\+.:?&@=/%#]*"; | |
| 46 | 45 | |
| 47 | 46 | int docTabIconIDs[] = {IDI_SAVED_ICON, IDI_UNSAVED_ICON, IDI_READONLY_ICON}; |
| 48 | 47 | enum tb_stat {tb_saved, tb_unsaved, tb_ro}; |
| ... | ...@@ -72,8 +71,8 @@ | |
| 72 | 71 | Notepad_plus::Notepad_plus(): Window(), _mainWindowStatus(0), _pDocTab(NULL), _pEditView(NULL), |
| 73 | 72 | _pMainSplitter(NULL), _isfullScreen(false), |
| 74 | 73 | _recordingMacro(false), _pTrayIco(NULL), _isUDDocked(false), _isRTL(false), |
| 75 | _linkTriggered(true), _isDocModifing(false), _isHotspotDblClicked(false), _sysMenuEntering(false), | |
| 76 | _autoCompleteMain(&_mainEditView), _autoCompleteSub(&_subEditView), _smartHighlighter(&_findReplaceDlg) | |
| 74 | _isHotspotDblClicked(false), _isLinkTriggered(false), _sysMenuEntering(false), _smartHighlighter(&_findReplaceDlg), | |
| 75 | _urlHighlighter(&_findReplaceDlg), _autoCompleteMain(&_mainEditView), _autoCompleteSub(&_subEditView) | |
| 77 | 76 | { |
| 78 | 77 | |
| 79 | 78 | ZeroMemory(&_prevSelectedRange, sizeof(_prevSelectedRange)); |
| ... | ...@@ -685,8 +684,6 @@ | |
| 685 | 684 | } |
| 686 | 685 | } |
| 687 | 686 | PathRemoveFileSpec(longFileName); |
| 688 | _linkTriggered = true; | |
| 689 | _isDocModifing = false; | |
| 690 | 687 | |
| 691 | 688 | // Notify plugins that current file is just opened |
| 692 | 689 | scnN.nmhdr.code = NPPN_FILEOPENED; |
| ... | ...@@ -1803,20 +1800,22 @@ | |
| 1803 | 1800 | if (notification->modificationType & (SC_MOD_DELETETEXT | SC_MOD_INSERTTEXT)) |
| 1804 | 1801 | { |
| 1805 | 1802 | prevWasEdit = true; |
| 1806 | _linkTriggered = true; | |
| 1807 | _isDocModifing = true; | |
| 1803 | _isLinkTriggered = true; | |
| 1808 | 1804 | ::InvalidateRect(notifyView->getHSelf(), NULL, TRUE); |
| 1809 | 1805 | } |
| 1806 | if (notification->modificationType & (SC_MOD_CHANGESTYLE)) | |
| 1807 | { | |
| 1808 | _isLinkTriggered = true; | |
| 1809 | } | |
| 1810 | 1810 | if (notification->modificationType & SC_MOD_CHANGEFOLD) |
| 1811 | 1811 | { |
| 1812 | if (prevWasEdit) { | |
| 1813 | notifyView->foldChanged(notification->line, | |
| 1814 | notification->foldLevelNow, notification->foldLevelPrev); | |
| 1812 | if (prevWasEdit) | |
| 1813 | { | |
| 1814 | notifyView->foldChanged(notification->line, notification->foldLevelNow, notification->foldLevelPrev); | |
| 1815 | 1815 | prevWasEdit = false; |
| 1816 | 1816 | } |
| 1817 | 1817 | } |
| 1818 | else | |
| 1819 | if (!(notification->modificationType & (SC_MOD_DELETETEXT | SC_MOD_INSERTTEXT))) | |
| 1818 | else if (!(notification->modificationType & (SC_MOD_DELETETEXT | SC_MOD_INSERTTEXT))) | |
| 1820 | 1819 | { |
| 1821 | 1820 | prevWasEdit = false; |
| 1822 | 1821 | } |
| ... | ...@@ -2206,7 +2205,10 @@ | |
| 2206 | 2205 | |
| 2207 | 2206 | case SCN_DOUBLECLICK : |
| 2208 | 2207 | { |
| 2209 | if (_isHotspotDblClicked) | |
| 2208 | int pos = notifyView->execute(SCI_GETCURRENTPOS); | |
| 2209 | int idStyle = notifyView->execute(SCI_GETSTYLEAT, pos); | |
| 2210 | bool isHotspot = notifyView->execute(SCI_STYLEGETHOTSPOT, idStyle) != 0; | |
| 2211 | if (isHotspot) | |
| 2210 | 2212 | { |
| 2211 | 2213 | int pos = notifyView->execute(SCI_GETCURRENTPOS); |
| 2212 | 2214 | notifyView->execute(SCI_SETCURRENTPOS, pos); |
| ... | ...@@ -2227,6 +2229,7 @@ | |
| 2227 | 2229 | xmlTagMatchHiliter.tagMatch(nppGUI._enableTagAttrsHilite); |
| 2228 | 2230 | } |
| 2229 | 2231 | _smartHighlighter.highlightView(notifyView); |
| 2232 | ||
| 2230 | 2233 | updateStatusBar(); |
| 2231 | 2234 | AutoCompletion * autoC = isFromPrimary?&_autoCompleteMain:&_autoCompleteSub; |
| 2232 | 2235 | autoC->update(0); |
| ... | ...@@ -2235,7 +2238,11 @@ | |
| 2235 | 2238 | |
| 2236 | 2239 | case SCN_SCROLLED: |
| 2237 | 2240 | { |
| 2238 | _smartHighlighter.highlightView(notifyView); | |
| 2241 | if (notification->wParam) //scrolling vertically | |
| 2242 | { | |
| 2243 | _smartHighlighter.highlightView(notifyView); | |
| 2244 | _urlHighlighter.highlightView(notifyView); | |
| 2245 | } | |
| 2239 | 2246 | break; |
| 2240 | 2247 | } |
| 2241 | 2248 | |
| ... | ...@@ -2287,17 +2294,13 @@ | |
| 2287 | 2294 | |
| 2288 | 2295 | case SCN_PAINTED: |
| 2289 | 2296 | { |
| 2290 | if (_syncInfo.doSync()) | |
| 2291 | doSynScorll(HWND(notification->nmhdr.hwndFrom)); | |
| 2292 | ||
| 2293 | if (_linkTriggered) | |
| 2297 | if (_isLinkTriggered) | |
| 2294 | 2298 | { |
| 2295 | int urlAction = (NppParameters::getInstance())->getNppGUI()._styleURL; | |
| 2296 | if ((urlAction == 1) || (urlAction == 2)) | |
| 2297 | addHotSpot(_isDocModifing); | |
| 2298 | _linkTriggered = false; | |
| 2299 | _isDocModifing = false; | |
| 2299 | _urlHighlighter.highlightView(notifyView); | |
| 2300 | _isLinkTriggered = false; | |
| 2300 | 2301 | } |
| 2302 | if (_syncInfo.doSync()) | |
| 2303 | doSynScorll(HWND(notification->nmhdr.hwndFrom)); | |
| 2301 | 2304 | break; |
| 2302 | 2305 | } |
| 2303 | 2306 | |
| ... | ...@@ -2312,19 +2315,22 @@ | |
| 2312 | 2315 | notifyView->execute(SCI_SETTARGETSTART, startPos); |
| 2313 | 2316 | notifyView->execute(SCI_SETTARGETEND, endPos); |
| 2314 | 2317 | |
| 2315 | int posFound = notifyView->execute(SCI_SEARCHINTARGET, strlen(urlHttpRegExpr), (LPARAM)urlHttpRegExpr); | |
| 2318 | /*int posFound = notifyView->execute(SCI_SEARCHINTARGET, strlen(urlHttpRegExpr), (LPARAM)urlHttpRegExpr); | |
| 2316 | 2319 | if (posFound != -1) |
| 2317 | 2320 | { |
| 2318 | 2321 | startPos = int(notifyView->execute(SCI_GETTARGETSTART)); |
| 2319 | 2322 | endPos = int(notifyView->execute(SCI_GETTARGETEND)); |
| 2320 | } | |
| 2323 | }*/ | |
| 2321 | 2324 | |
| 2322 | char currentWord[MAX_PATH*2]; | |
| 2325 | int length = endPos-startPos+1; | |
| 2326 | char * currentWord = new char[length]; | |
| 2323 | 2327 | notifyView->getText(currentWord, startPos, endPos); |
| 2324 | 2328 | |
| 2325 | 2329 | ::ShellExecute(_hSelf, "open", currentWord, NULL, NULL, SW_SHOW); |
| 2326 | _isHotspotDblClicked = true; | |
| 2330 | //Disabled: This message comes after SCN_DOUBLECLICK, so this method fails and prevents the next doubleclick from working | |
| 2331 | //_isHotspotDblClicked = true; | |
| 2327 | 2332 | notifyView->execute(SCI_SETCHARSDEFAULT); |
| 2333 | delete [] currentWord; | |
| 2328 | 2334 | break; |
| 2329 | 2335 | } |
| 2330 | 2336 | |
| ... | ...@@ -2451,133 +2457,6 @@ | |
| 2451 | 2457 | MaintainIndentation(chAdded); |
| 2452 | 2458 | } |
| 2453 | 2459 | |
| 2454 | void Notepad_plus::addHotSpot(bool docIsModifing) | |
| 2455 | { | |
| 2456 | //bool docIsModifing = true; | |
| 2457 | int posBegin2style = 0; | |
| 2458 | if (docIsModifing) | |
| 2459 | posBegin2style = _pEditView->execute(SCI_GETCURRENTPOS); | |
| 2460 | ||
| 2461 | int endStyle = _pEditView->execute(SCI_GETENDSTYLED); | |
| 2462 | if (docIsModifing) | |
| 2463 | { | |
| 2464 | ||
| 2465 | posBegin2style = _pEditView->execute(SCI_GETCURRENTPOS); | |
| 2466 | if (posBegin2style > 0) posBegin2style--; | |
| 2467 | unsigned char ch = (unsigned char)_pEditView->execute(SCI_GETCHARAT, posBegin2style); | |
| 2468 | ||
| 2469 | // determinating the type of EOF to make sure how many steps should we be back | |
| 2470 | if ((ch == 0x0A) || (ch == 0x0D)) | |
| 2471 | { | |
| 2472 | int eolMode = _pEditView->execute(SCI_GETEOLMODE); | |
| 2473 | ||
| 2474 | if ((eolMode == SC_EOL_CRLF) && (posBegin2style > 1)) | |
| 2475 | posBegin2style -= 2; | |
| 2476 | else if (posBegin2style > 0) | |
| 2477 | posBegin2style -= 1; | |
| 2478 | } | |
| 2479 | ||
| 2480 | ch = (unsigned char)_pEditView->execute(SCI_GETCHARAT, posBegin2style); | |
| 2481 | while ((posBegin2style > 0) && ((ch != 0x0A) && (ch != 0x0D))) | |
| 2482 | { | |
| 2483 | ch = (unsigned char)_pEditView->execute(SCI_GETCHARAT, posBegin2style--); | |
| 2484 | } | |
| 2485 | } | |
| 2486 | int style_hotspot = 30; | |
| 2487 | ||
| 2488 | int startPos = 0; | |
| 2489 | int endPos = _pEditView->execute(SCI_GETTEXTLENGTH); | |
| 2490 | ||
| 2491 | _pEditView->execute(SCI_SETSEARCHFLAGS, SCFIND_REGEXP|SCFIND_POSIX); | |
| 2492 | ||
| 2493 | _pEditView->execute(SCI_SETTARGETSTART, startPos); | |
| 2494 | _pEditView->execute(SCI_SETTARGETEND, endPos); | |
| 2495 | ||
| 2496 | vector<pair<int, int> > hotspotStylers; | |
| 2497 | ||
| 2498 | int posFound = _pEditView->execute(SCI_SEARCHINTARGET, strlen(urlHttpRegExpr), (LPARAM)urlHttpRegExpr); | |
| 2499 | ||
| 2500 | while (posFound != -1) | |
| 2501 | { | |
| 2502 | int start = int(_pEditView->execute(SCI_GETTARGETSTART)); | |
| 2503 | int end = int(_pEditView->execute(SCI_GETTARGETEND)); | |
| 2504 | int foundTextLen = end - start; | |
| 2505 | int idStyle = _pEditView->execute(SCI_GETSTYLEAT, posFound); | |
| 2506 | ||
| 2507 | if (end < posBegin2style - 1) | |
| 2508 | { | |
| 2509 | if (style_hotspot > 1) | |
| 2510 | style_hotspot--; | |
| 2511 | } | |
| 2512 | else | |
| 2513 | { | |
| 2514 | int fs = -1; | |
| 2515 | for (size_t i = 0 ; i < hotspotStylers.size() ; i++) | |
| 2516 | { | |
| 2517 | if (hotspotStylers[i].second == idStyle) | |
| 2518 | { | |
| 2519 | fs = hotspotStylers[i].first; | |
| 2520 | break; | |
| 2521 | } | |
| 2522 | } | |
| 2523 | ||
| 2524 | if (fs != -1) | |
| 2525 | { | |
| 2526 | _pEditView->execute(SCI_STARTSTYLING, start, 0xFF); | |
| 2527 | _pEditView->execute(SCI_SETSTYLING, foundTextLen, fs); | |
| 2528 | ||
| 2529 | } | |
| 2530 | else | |
| 2531 | { | |
| 2532 | pair<int, int> p(style_hotspot, idStyle); | |
| 2533 | hotspotStylers.push_back(p); | |
| 2534 | int activeFG = 0xFF0000; | |
| 2535 | ||
| 2536 | char fontName[256]; | |
| 2537 | Style hotspotStyle; | |
| 2538 | ||
| 2539 | hotspotStyle._styleID = style_hotspot; | |
| 2540 | _pEditView->execute(SCI_STYLEGETFONT, idStyle, (LPARAM)fontName); | |
| 2541 | hotspotStyle._fgColor = _pEditView->execute(SCI_STYLEGETFORE, idStyle); | |
| 2542 | hotspotStyle._bgColor = _pEditView->execute(SCI_STYLEGETBACK, idStyle); | |
| 2543 | hotspotStyle._fontSize = _pEditView->execute(SCI_STYLEGETSIZE, idStyle); | |
| 2544 | ||
| 2545 | int isBold = _pEditView->execute(SCI_STYLEGETBOLD, idStyle); | |
| 2546 | int isItalic = _pEditView->execute(SCI_STYLEGETITALIC, idStyle); | |
| 2547 | int isUnderline = _pEditView->execute(SCI_STYLEGETUNDERLINE, idStyle); | |
| 2548 | hotspotStyle._fontStyle = (isBold?FONTSTYLE_BOLD:0) | (isItalic?FONTSTYLE_ITALIC:0) | (isUnderline?FONTSTYLE_UNDERLINE:0); | |
| 2549 | ||
| 2550 | int fontStyle = (isBold?FONTSTYLE_BOLD:0) | (isItalic?FONTSTYLE_ITALIC:0) | (isUnderline?FONTSTYLE_UNDERLINE:0); | |
| 2551 | int urlAction = (NppParameters::getInstance())->getNppGUI()._styleURL; | |
| 2552 | if (urlAction == 2) | |
| 2553 | hotspotStyle._fontStyle |= FONTSTYLE_UNDERLINE; | |
| 2554 | ||
| 2555 | _pEditView->setStyle(hotspotStyle); | |
| 2556 | ||
| 2557 | _pEditView->execute(SCI_STYLESETHOTSPOT, style_hotspot, TRUE); | |
| 2558 | _pEditView->execute(SCI_SETHOTSPOTACTIVEFORE, TRUE, activeFG); | |
| 2559 | _pEditView->execute(SCI_SETHOTSPOTSINGLELINE, style_hotspot, 0); | |
| 2560 | _pEditView->execute(SCI_STARTSTYLING, start, 0x1F); | |
| 2561 | _pEditView->execute(SCI_SETSTYLING, foundTextLen, style_hotspot); | |
| 2562 | if (style_hotspot > 1) | |
| 2563 | style_hotspot--; | |
| 2564 | } | |
| 2565 | } | |
| 2566 | ||
| 2567 | _pEditView->execute(SCI_SETTARGETSTART, posFound + foundTextLen); | |
| 2568 | _pEditView->execute(SCI_SETTARGETEND, endPos); | |
| 2569 | ||
| 2570 | ||
| 2571 | posFound = _pEditView->execute(SCI_SEARCHINTARGET, strlen(urlHttpRegExpr), (LPARAM)urlHttpRegExpr); | |
| 2572 | } | |
| 2573 | ||
| 2574 | ||
| 2575 | _pEditView->execute(SCI_STARTSTYLING, endStyle, 0xFF); | |
| 2576 | _pEditView->execute(SCI_SETSTYLING, 0, 0); | |
| 2577 | } | |
| 2578 | ||
| 2579 | ||
| 2580 | ||
| 2581 | 2460 | void Notepad_plus::MaintainIndentation(char ch) |
| 2582 | 2461 | { |
| 2583 | 2462 | int eolMode = int(_pEditView->execute(SCI_GETEOLMODE)); |
| ... | ...@@ -3987,7 +3866,6 @@ | |
| 3987 | 3866 | tld.doDialog(); |
| 3988 | 3867 | } |
| 3989 | 3868 | } |
| 3990 | _linkTriggered = true; | |
| 3991 | 3869 | } |
| 3992 | 3870 | break; |
| 3993 | 3871 | |
| ... | ...@@ -6655,7 +6533,6 @@ | |
| 6655 | 6533 | nbDoc += viewVisible(SUB_VIEW)?_subDocTab.nbItem():0; |
| 6656 | 6534 | if (nbDoc > 1) |
| 6657 | 6535 | activateNextDoc((GET_APPCOMMAND_LPARAM(lParam) == APPCOMMAND_BROWSER_FORWARD)?dirDown:dirUp); |
| 6658 | _linkTriggered = true; | |
| 6659 | 6536 | } |
| 6660 | 6537 | return ::DefWindowProc(hwnd, Message, wParam, lParam); |
| 6661 | 6538 | } |
| ... | ...@@ -8204,10 +8081,9 @@ | |
| 8204 | 8081 | setWorkingDir(dir); |
| 8205 | 8082 | setTitle(); |
| 8206 | 8083 | //Make sure the colors of the tab controls match |
| 8084 | _isLinkTriggered = true; | |
| 8207 | 8085 | ::InvalidateRect(_mainDocTab.getHSelf(), NULL, FALSE); |
| 8208 | 8086 | ::InvalidateRect(_subDocTab.getHSelf(), NULL, FALSE); |
| 8209 | ||
| 8210 | _linkTriggered = true; | |
| 8211 | 8087 | } |
| 8212 | 8088 | |
| 8213 | 8089 | void Notepad_plus::loadCommandlineParams(const char * commandLine, CmdLineParams * pCmdParams) { |
| ... | ...@@ -410,6 +410,10 @@ | |
| 410 | 410 | > |
| 411 | 411 | </File> |
| 412 | 412 | <File |
| 413 | RelativePath="..\src\ScitillaComponent\UrlHighlighter.cpp" | |
| 414 | > | |
| 415 | </File> | |
| 416 | <File | |
| 413 | 417 | RelativePath="..\src\ScitillaComponent\UserDefineDialog.cpp" |
| 414 | 418 | > |
| 415 | 419 | </File> |
| ... | ...@@ -719,6 +723,10 @@ | |
| 719 | 723 | > |
| 720 | 724 | </File> |
| 721 | 725 | <File |
| 726 | RelativePath="..\src\ScitillaComponent\UrlHighlighter.h" | |
| 727 | > | |
| 728 | </File> | |
| 729 | <File | |
| 722 | 730 | RelativePath="..\src\ScitillaComponent\UserDefineDialog.h" |
| 723 | 731 | > |
| 724 | 732 | </File> |
| ... | ...@@ -75,7 +75,7 @@ | |
| 75 | 75 | <Keywords name="instre1">as case class data default deriving do else hiding if import in infix infixl infixr instance let module newtype of proc qualified rec then type where _</Keywords> |
| 76 | 76 | </Language> |
| 77 | 77 | <Language name="html" ext="html htm shtml shtm xhtml" commentLine="" commentStart="<!--" commentEnd="-->"> |
| 78 | <Keywords name="instre1">!doctype a abbr accept-charset accept accesskey acronym action address align alink alt applet archive area axis b background base basefont bdo bgcolor big blockquote body border br button caption cellpadding cellspacing center char charoff charset checkbox checked cite class classid clear code codebase codetype col colgroup color cols colspan compact content coords data datafld dataformatas datapagesize datasrc datetime dd declare defer del dfn dir disabled div dl dt em enctype event face fieldset file font for form frame frameborder frameset h1 h2 h3 h4 h5 h6 head headers height hidden hr href hreflang hspace html http-equiv i id iframe image img input ins isindex ismap kbd label lang language leftmargin legend li link longdesc map marginwidth marginheight maxlength media menu meta method multiple name noframes nohref noresize noscript noshade nowrap object ol onblur onchange onclick ondblclick onfocus onkeydown onkeypress onkeyup onload onmousedown onmousemove onmouseover onmouseout onmouseup optgroup option onreset onselect onsubmit onunload p param password profile pre prompt public q radio readonly rel reset rev rows rowspan rules s samp scheme scope script select selected shape size small span src standby start strike strong style sub submit summary sup tabindex table target tbody td text textarea tfoot th thead title topmargin tr tt type u ul usemap valign value valuetype var version vlink vspace width xml xmlns</Keywords> | |
| 78 | <Keywords name="instre1">!doctype a abbr accept-charset accept accesskey acronym action address align alink alt applet archive area axis b background base basefont bdo bgcolor big blockquote body border br button caption cellpadding cellspacing center char charoff charset checkbox checked cite class classid clear code codebase codetype col colgroup color cols colspan comment compact content coords data datafld dataformatas datapagesize datasrc datetime dd declare defer del dfn dir disabled div dl dt em embed enctype event face fieldset file font for form frame frameborder frameset h1 h2 h3 h4 h5 h6 head headers height hidden hr href hreflang hspace html http-equiv i id iframe image img input ins isindex ismap kbd label lang language leftmargin legend li link longdesc map marginwidth marginheight maxlength media menu meta method multiple name noembed noframes nohref noresize noscript noshade nowrap object ol onblur onchange onclick ondblclick onfocus onkeydown onkeypress onkeyup onload onmousedown onmousemove onmouseover onmouseout onmouseup optgroup option onreset onselect onsubmit onunload p param password profile pre prompt public q radio readonly rel reset rev rows rowspan rules s samp scheme scope script select selected shape size small span src standby start strike strong style sub submit summary sup tabindex table target tbody td text textarea tfoot th thead title topmargin tr tt type u ul usemap valign value valuetype var version vlink vspace width xml xmlns</Keywords> | |
| 79 | 79 | </Language> |
| 80 | 80 | <Language name="ini" ext="ini inf reg url" commentLine=";"> |
| 81 | 81 | </Language> |
| ... | ...@@ -49,6 +49,7 @@ | |
| 49 | 49 | #include "AutoCompletion.h" |
| 50 | 50 | #include "Buffer.h" |
| 51 | 51 | #include "SmartHighlighter.h" |
| 52 | #include "UrlHighlighter.h" | |
| 52 | 53 | |
| 53 | 54 | #define NOTEPAD_PP_CLASS_NAME "Notepad++" |
| 54 | 55 | |
| ... | ...@@ -199,6 +200,7 @@ | |
| 199 | 200 | AutoCompletion _autoCompleteSub; //each Scintilla has its own autoComplete |
| 200 | 201 | |
| 201 | 202 | SmartHighlighter _smartHighlighter; |
| 203 | UrlHighlighter _urlHighlighter; | |
| 202 | 204 | |
| 203 | 205 | TiXmlNode *_nativeLang, *_toolIcons; |
| 204 | 206 | |
| ... | ...@@ -263,9 +265,8 @@ | |
| 263 | 265 | RunMacroDlg _runMacroDlg; |
| 264 | 266 | |
| 265 | 267 | // For hotspot |
| 266 | bool _linkTriggered; | |
| 267 | bool _isDocModifing; | |
| 268 | 268 | bool _isHotspotDblClicked; |
| 269 | bool _isLinkTriggered; | |
| 269 | 270 | |
| 270 | 271 | //For Dynamic selection highlight |
| 271 | 272 | CharacterRange _prevSelectedRange; |
| ... | ...@@ -526,8 +527,6 @@ | |
| 526 | 527 | void charAdded(char chAdded); |
| 527 | 528 | void MaintainIndentation(char ch); |
| 528 | 529 | |
| 529 | void addHotSpot(bool docIsModifing = false); | |
| 530 | ||
| 531 | 530 | void bookmarkAdd(int lineno) const { |
| 532 | 531 | if (lineno == -1) |
| 533 | 532 | lineno = _pEditView->getCurrentLineNumber(); |