Skip to content

Commit

Permalink
Merge branch 'npp_official_svn' into jl/LH-45/integrate-npp-svn
Browse files Browse the repository at this point in the history
[UPDATE] Refactor Notepad_plus.cpp (in progress).

Conflicts:
	PowerEditor/src/Notepad_plus.cpp
	PowerEditor/src/Notepad_plus.h
	PowerEditor/src/NppBigSwitch.cpp
	PowerEditor/src/NppNotification.cpp
	PowerEditor/visual.net/notepadPlus.vcproj

[#45]

Signed-off-by: Jocelyn Legault <jocelynlegault@gmail.com>
  • Loading branch information
joce committed Sep 27, 2010
2 parents 8c2b338 + 11c1f4d commit 213ee7e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions PowerEditor/src/Notepad_plus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1863,7 +1863,7 @@ void Notepad_plus::addHotSpot(bool docIsModifing)
int styleMask = (1<<bitsNeeded)-1;

int style_hotspot = styleMask-1;
int posFound = _pEditView->execute(SCI_SEARCHINTARGET, strlen(urlHttpRegExpr), (LPARAM)urlHttpRegExpr);
int posFound = _pEditView->execute(SCI_SEARCHINTARGET, strlen(URL_HTTP_REG_EXPR), (LPARAM)URL_HTTP_REG_EXPR);

while (posFound != -1)
{
Expand Down Expand Up @@ -1926,7 +1926,7 @@ void Notepad_plus::addHotSpot(bool docIsModifing)
_pEditView->execute(SCI_SETTARGETSTART, posFound + foundTextLen);
_pEditView->execute(SCI_SETTARGETEND, endPos);

posFound = _pEditView->execute(SCI_SEARCHINTARGET, strlen(urlHttpRegExpr), (LPARAM)urlHttpRegExpr);
posFound = _pEditView->execute(SCI_SEARCHINTARGET, strlen(URL_HTTP_REG_EXPR), (LPARAM)URL_HTTP_REG_EXPR);
}

_pEditView->execute(SCI_STARTSTYLING, endStyle, 0xFF);
Expand Down Expand Up @@ -4647,7 +4647,6 @@ bool Notepad_plus::isDlgsMsg(MSG *msg, bool unicodeSupported) const
return false;
}


bool Notepad_plus::goToPreviousIndicator(int indicID2Search, bool isWrap) const
{
int position = _pEditView->execute(SCI_GETCURRENTPOS);
Expand Down
2 changes: 1 addition & 1 deletion PowerEditor/src/Notepad_plus.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
#define MENU 0x01
#define TOOLBAR 0x02

#define urlHttpRegExpr "http://[a-z0-9_\\-\\+~.:?&@=/%#]*"
#define URL_HTTP_REG_EXPR "http://[a-z0-9_\\-\\+~.:?&@=/%#]*"

enum FileTransferMode {
TransferClone = 0x01,
Expand Down
2 changes: 1 addition & 1 deletion PowerEditor/src/NppNotification.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ BOOL Notepad_plus::notify(SCNotification *notification)
notifyView->execute(SCI_SETTARGETSTART, startPos);
notifyView->execute(SCI_SETTARGETEND, endPos);

int posFound = notifyView->execute(SCI_SEARCHINTARGET, strlen(urlHttpRegExpr), (LPARAM)urlHttpRegExpr);
int posFound = notifyView->execute(SCI_SEARCHINTARGET, strlen(URL_HTTP_REG_EXPR), (LPARAM)URL_HTTP_REG_EXPR);
if (posFound != -1)
{
startPos = int(notifyView->execute(SCI_GETTARGETSTART));
Expand Down

0 comments on commit 213ee7e

Please sign in to comment.