diff --git a/Versions/build.txt b/Versions/build.txt
index d00491fd7..0cfbf0888 100644
--- a/Versions/build.txt
+++ b/Versions/build.txt
@@ -1 +1 @@
-1
+2
diff --git a/grepWinNP3/GPL_v3.0_LICENSE.txt b/grepWinNP3/GPL_v3.0_LICENSE.txt
index 2af0eb39e..3131c8363 100644
--- a/grepWinNP3/GPL_v3.0_LICENSE.txt
+++ b/grepWinNP3/GPL_v3.0_LICENSE.txt
@@ -626,8 +626,8 @@ grepWin is developed by Stefan Küng (https://tools.stefankueng.com/grepWin.html
Original grepWin binaries (currently v1.9.2) and corresponding source code (according to GPL v3.0)
can be retrived at folowing location https://github.com/stefankueng/grepWin/releases/tag/1.9.2.
-Modified grepWinNP3 binaries (Notepad3 MOD, currently v1.9.2) and corresponding source code
+Modified grepWinNP3 binaries (Notepad3 MOD, currently v2.0.x) and corresponding source code
(according to GPL v3.0) can be retrived at folowing location:
-https://github.com/RaiKoHoff/grepWin/tree/grepWinNP3.
+https://github.com/rizonesoft/Notepad3/tree/master/grepWinNP3.
########################################################################################################
diff --git a/language/common_res.rc b/language/common_res.rc
index ca8ef40d7..252a65720 100644
--- a/language/common_res.rc
+++ b/language/common_res.rc
@@ -91,6 +91,7 @@ IDS_MUI_ABOUT_CONTRIBS "\
IDS_MUI_ABOUT_LIBS "\
\\cf0 N.Hodgson (Scintilla)\\tab https://www.scintilla.org\\par\
\\cf0 K.Kosako (Oniguruma Regex)\\tab https://github.com/kkos/oniguruma\\par\
+\\cf0 Stefan Küng (grepWin)\\tab https://github.com/stefankueng/grepWin\\par\
\\cf0 D.Dyer (NotepadCrypt)\\tab https://www.real-me.net/ddyer/notepad/NotepadCrypt.html\\par\
\\cf0 T.D.Hanson (uthash)\\tab https://troydhanson.github.io/uthash\\par\
\\cf0 Carbo Kuo (Mozilla's uchardet)\\tab https://www.freedesktop.org/wiki/Software/uchardet\\par\
@@ -134,6 +135,7 @@ IDS_MUI_ABOUT_MORE "\
IDS_MUI_ABOUT_LICENSES "\
\\cf0 Scintilla\\tab https://www.scintilla.org/License.txt\\par\
\\cf0 Oniguruma Regex\\tab https://github.com/kkos/oniguruma/blob/master/COPYING\\par\
+\\cf0 grepWin\\tab https://github.com/stefankueng/grepWin/blob/master/LICENSE\\par\
\\cf0 uthash\\tab https://troydhanson.github.io/uthash/license.html\\par\
\\cf0 uchardet\\tab https://www.freedesktop.org/wiki/Software/uchardet/#license\\par\
\\cf0 TinyExpr\\tab https://github.com/codeplea/tinyexpr/blob/master/LICENSE\\par\
diff --git a/minipath/src/Helpers.c b/minipath/src/Helpers.c
index 90d08adb1..aa4fc97d3 100644
--- a/minipath/src/Helpers.c
+++ b/minipath/src/Helpers.c
@@ -49,11 +49,7 @@ extern WCHAR g_wchIniFile[MAX_PATH];
//
void BeginWaitCursor()
{
-
- DestroyCursor(
- SetCursor(
- LoadCursor(NULL,IDC_WAIT)));
-
+ DestroyCursor(SetCursor(LoadCursor(NULL,IDC_WAIT)));
}
@@ -63,11 +59,7 @@ void BeginWaitCursor()
//
void EndWaitCursor()
{
-
- DestroyCursor(
- SetCursor(
- LoadCursor(NULL,IDC_ARROW)));
-
+ DestroyCursor(SetCursor(LoadCursor(NULL,IDC_ARROW)));
}
diff --git a/res/Notepad3.exe.manifest.conf b/res/Notepad3.exe.manifest.conf
index c2ae21606..29fe953f2 100644
--- a/res/Notepad3.exe.manifest.conf
+++ b/res/Notepad3.exe.manifest.conf
@@ -3,7 +3,7 @@
Notepad3 BETA
diff --git a/src/Config/Config.cpp b/src/Config/Config.cpp
index 7bd560882..2504363bd 100644
--- a/src/Config/Config.cpp
+++ b/src/Config/Config.cpp
@@ -1284,7 +1284,7 @@ void LoadSettings()
GET_INT_VALUE_FROM_INISECTION(WordWrapMode, 0, 0, 1);
GET_INT_VALUE_FROM_INISECTION(WordWrapIndent, 0, 0, 6);
- GET_BOOL_VALUE_FROM_INISECTION(WordWrap, false); Globals.fvBackup.bWordWrap = Settings.WordWrap;
+ GET_BOOL_VALUE_FROM_INISECTION(WordWrap, true); Globals.fvBackup.bWordWrap = Settings.WordWrap;
GET_BOOL_VALUE_FROM_INISECTION(TabsAsSpaces, false); Globals.fvBackup.bTabsAsSpaces = Settings.TabsAsSpaces;
GET_BOOL_VALUE_FROM_INISECTION(TabIndents, true); Globals.fvBackup.bTabIndents = Settings.TabIndents;
GET_INT_VALUE_FROM_INISECTION(TabWidth, 4, 1, 1024); Globals.fvBackup.iTabWidth = Settings.TabWidth;
@@ -1292,11 +1292,11 @@ void LoadSettings()
GET_INT_VALUE_FROM_INISECTION(LongLinesLimit, 80, 0, LONG_LINES_MARKER_LIMIT); Globals.fvBackup.iLongLinesLimit = Settings.LongLinesLimit;
Globals.iWrapCol = Settings.LongLinesLimit;
- Defaults.WordWrapSymbols = 22;
+ Defaults.WordWrapSymbols = 2;
int const iWS = IniSectionGetInt(IniSecSettings, L"WordWrapSymbols", Defaults.WordWrapSymbols);
Settings.WordWrapSymbols = clampi(iWS % 10, 0, 2) + clampi((iWS % 100 - iWS % 10) / 10, 0, 2) * 10;
- GET_BOOL_VALUE_FROM_INISECTION(ShowWordWrapSymbols, false);
+ GET_BOOL_VALUE_FROM_INISECTION(ShowWordWrapSymbols, true);
GET_BOOL_VALUE_FROM_INISECTION(MatchBraces, true);
GET_BOOL_VALUE_FROM_INISECTION(AutoCloseTags, false);
GET_INT_VALUE_FROM_INISECTION(HighlightCurrentLine, 1, 0, 2);
@@ -1971,7 +1971,7 @@ bool SaveAllSettings(bool bForceSaveSettings)
bool ok = false;
- BeginWaitCursor(tchMsg);
+ BeginWaitCursor(true,tchMsg);
__try {
diff --git a/src/Edit.c b/src/Edit.c
index 392bbc2a9..cf7076318 100644
--- a/src/Edit.c
+++ b/src/Edit.c
@@ -6808,8 +6808,6 @@ void EditMarkAllOccurrences(HWND hwnd, bool bForceClear)
return;
}
- BeginWaitCursor(L"Mark Occ...");
-
int const searchFlags = GetMarkAllOccSearchFlags();
_IGNORE_NOTIFY_CHANGE_;
@@ -6831,8 +6829,6 @@ void EditMarkAllOccurrences(HWND hwnd, bool bForceClear)
}
_OBSERVE_NOTIFY_CHANGE_;
-
- EndWaitCursor();
}
@@ -7093,7 +7089,7 @@ bool EditReplaceAll(HWND hwnd, LPCEDITFINDREPLACE lpefr, bool bShowInfo)
DocPos const end = Sci_GetDocEndPosition();
DocPos enlargement = 0;
- BeginWaitCursor(NULL);
+ BeginWaitCursor(true,L"Replace all...")
Globals.iReplacedOccurrences = EditReplaceAllInRange(hwnd, lpefr, start, end, &enlargement);
EndWaitCursor();
@@ -7129,8 +7125,6 @@ bool EditReplaceAllInSelection(HWND hwnd, LPCEDITFINDREPLACE lpefr, bool bShowIn
Globals.iReplacedOccurrences = EditReplaceAllInRange(hwnd, lpefr, start, end, &enlargement);
- BeginWaitCursor(L"Replace all...")
-
if (Globals.iReplacedOccurrences > 0)
{
if (currPos < anchorPos)
@@ -7148,8 +7142,6 @@ bool EditReplaceAllInSelection(HWND hwnd, LPCEDITFINDREPLACE lpefr, bool bShowIn
}
}
- EndWaitCursor();
-
return (Globals.iReplacedOccurrences > 0) ? true : false;
}
@@ -7181,7 +7173,7 @@ void EditClearAllOccurrenceMarkers(HWND hwnd)
//
void EditToggleView(HWND hwnd)
{
- BeginWaitCursor(L"Toggle View...");
+ BeginWaitCursor(true,L"Toggle View...");
FocusedView.HideNonMatchedLines = !FocusedView.HideNonMatchedLines; // toggle
diff --git a/src/Notepad3.c b/src/Notepad3.c
index d4050618c..7d3516a32 100644
--- a/src/Notepad3.c
+++ b/src/Notepad3.c
@@ -3929,7 +3929,7 @@ LRESULT MsgCommand(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam)
case IDM_ENCODING_ANSI: iNewEncoding = CPI_ANSI_DEFAULT; break;
}
}
- BeginWaitCursor(L"Recoding...");
+ BeginWaitCursor(true,L"Recoding...");
_IGNORE_NOTIFY_CHANGE_;
if (EditSetNewEncoding(Globals.hwndEdit, iNewEncoding, (s_flagSetEncoding != CPI_NONE))) {
@@ -3984,7 +3984,7 @@ LRESULT MsgCommand(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam)
case IDM_LINEENDINGS_CR:
case IDM_LINEENDINGS_LF:
{
- BeginWaitCursor(L"Line Breaks...");
+ BeginWaitCursor(true,L"Line Breaks...");
_IGNORE_NOTIFY_CHANGE_;
int const _eol_mode = (iLoWParam - IDM_LINEENDINGS_CRLF); // SC_EOL_CRLF(0), SC_EOL_CR(1), SC_EOL_LF(2)
SciCall_SetEOLMode(_eol_mode);
@@ -4275,105 +4275,77 @@ LRESULT MsgCommand(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam)
case IDM_EDIT_ENCLOSESELECTION:
if (EditEncloseSelectionDlg(hwnd,s_wchPrefixSelection,s_wchAppendSelection)) {
- BeginWaitCursor(NULL);
EditEncloseSelection(s_wchPrefixSelection,s_wchAppendSelection);
- EndWaitCursor();
}
break;
case IDM_EDIT_PADWITHSPACES:
- BeginWaitCursor(NULL);
EditPadWithSpaces(Globals.hwndEdit,false,false);
- EndWaitCursor();
break;
case IDM_EDIT_STRIP1STCHAR:
- BeginWaitCursor(NULL);
EditStripFirstCharacter(Globals.hwndEdit);
- EndWaitCursor();
break;
case IDM_EDIT_STRIPLASTCHAR:
- BeginWaitCursor(NULL);
EditStripLastCharacter(Globals.hwndEdit, false, false);
- EndWaitCursor();
break;
case IDM_EDIT_TRIMLINES:
- BeginWaitCursor(NULL);
EditStripLastCharacter(Globals.hwndEdit, false, true);
- EndWaitCursor();
break;
case IDM_EDIT_COMPRESS_BLANKS:
- BeginWaitCursor(NULL);
EditCompressBlanks(Globals.hwndEdit);
- EndWaitCursor();
break;
case IDM_EDIT_MERGEBLANKLINES:
- BeginWaitCursor(NULL);
EditRemoveBlankLines(Globals.hwndEdit, true, true);
- EndWaitCursor();
break;
case IDM_EDIT_MERGEEMPTYLINES:
- BeginWaitCursor(NULL);
EditRemoveBlankLines(Globals.hwndEdit, true, false);
- EndWaitCursor();
break;
case IDM_EDIT_REMOVEBLANKLINES:
- BeginWaitCursor(NULL);
EditRemoveBlankLines(Globals.hwndEdit, false, true);
- EndWaitCursor();
break;
case IDM_EDIT_REMOVEEMPTYLINES:
- BeginWaitCursor(NULL);
EditRemoveBlankLines(Globals.hwndEdit, false, false);
- EndWaitCursor();
break;
case IDM_EDIT_REMOVEDUPLICATELINES:
- BeginWaitCursor(NULL);
EditRemoveDuplicateLines(Globals.hwndEdit, false);
- EndWaitCursor();
break;
case IDM_EDIT_MODIFYLINES:
if (EditModifyLinesDlg(hwnd,s_wchPrefixLines,s_wchAppendLines)) {
- BeginWaitCursor(NULL);
EditModifyLines(s_wchPrefixLines,s_wchAppendLines);
- EndWaitCursor();
}
break;
case IDM_EDIT_ALIGN:
if (EditAlignDlg(hwnd,&s_iAlignMode)) {
- BeginWaitCursor(NULL);
EditAlignText(s_iAlignMode);
- EndWaitCursor();
}
break;
case IDM_EDIT_SORTLINES:
if (EditSortDlg(hwnd,&s_iSortOptions)) {
- BeginWaitCursor(NULL);
EditSortLines(Globals.hwndEdit,s_iSortOptions);
- EndWaitCursor();
}
break;
@@ -4384,108 +4356,80 @@ LRESULT MsgCommand(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam)
if (ColumnWrapDlg(hwnd, IDD_MUI_COLUMNWRAP, &uWrpCol))
{
Globals.iWrapCol = clampi((int)uWrpCol, SciCall_GetTabWidth(), LONG_LINES_MARKER_LIMIT);
- BeginWaitCursor(NULL);
EditWrapToColumn(Globals.iWrapCol);
- EndWaitCursor();
}
}
break;
case IDM_EDIT_SPLITLINES:
- BeginWaitCursor(NULL);
EditSplitLines(Globals.hwndEdit);
- EndWaitCursor();
break;
case IDM_EDIT_JOINLINES:
- BeginWaitCursor(NULL);
EditJoinLinesEx(false, true);
- EndWaitCursor();
break;
case IDM_EDIT_JOINLN_NOSP:
- BeginWaitCursor(NULL);
EditJoinLinesEx(false, false);
- EndWaitCursor();
break;
case IDM_EDIT_JOINLINES_PARA:
- BeginWaitCursor(NULL);
EditJoinLinesEx(true, true);
- EndWaitCursor();
break;
case IDM_EDIT_CONVERTUPPERCASE:
{
- BeginWaitCursor(NULL);
_BEGIN_UNDO_ACTION_;
SciCall_UpperCase();
_END_UNDO_ACTION_;
- EndWaitCursor();
}
break;
case IDM_EDIT_CONVERTLOWERCASE:
{
- BeginWaitCursor(NULL);
_BEGIN_UNDO_ACTION_;
SciCall_LowerCase();
_END_UNDO_ACTION_;
- EndWaitCursor();
}
break;
case IDM_EDIT_INVERTCASE:
- BeginWaitCursor(NULL);
EditInvertCase(Globals.hwndEdit);
- EndWaitCursor();
break;
case IDM_EDIT_TITLECASE:
- BeginWaitCursor(NULL);
EditTitleCase(Globals.hwndEdit);
- EndWaitCursor();
break;
case IDM_EDIT_SENTENCECASE:
- BeginWaitCursor(NULL);
EditSentenceCase(Globals.hwndEdit);
- EndWaitCursor();
break;
case IDM_EDIT_CONVERTTABS:
- BeginWaitCursor(NULL);
EditTabsToSpaces(Globals.fvCurFile.iTabWidth, false);
- EndWaitCursor();
break;
case IDM_EDIT_CONVERTSPACES:
- BeginWaitCursor(NULL);
EditSpacesToTabs(Globals.fvCurFile.iTabWidth, false);
- EndWaitCursor();
break;
case IDM_EDIT_CONVERTTABS2:
- BeginWaitCursor(NULL);
EditTabsToSpaces(Globals.fvCurFile.iTabWidth, true);
- EndWaitCursor();
break;
case IDM_EDIT_CONVERTSPACES2:
- BeginWaitCursor(NULL);
EditSpacesToTabs(Globals.fvCurFile.iTabWidth, true);
- EndWaitCursor();
break;
@@ -4572,8 +4516,6 @@ LRESULT MsgCommand(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam)
case IDM_EDIT_LINECOMMENT:
{
- BeginWaitCursor(NULL);
-
switch (SciCall_GetLexer()) {
case SCLEX_CPP:
case SCLEX_D:
@@ -4635,15 +4577,12 @@ LRESULT MsgCommand(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam)
// do nothing
break;
}
- EndWaitCursor();
}
break;
case IDM_EDIT_STREAMCOMMENT:
{
- BeginWaitCursor(NULL);
-
switch (SciCall_GetLexer()) {
case SCLEX_D:
//~EditEncloseSelection(Globals.hwndEdit, L"/+", L"+/");
@@ -4703,43 +4642,34 @@ LRESULT MsgCommand(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam)
// do nothing
break;
}
- EndWaitCursor();
}
break;
case IDM_EDIT_URLENCODE:
{
- BeginWaitCursor(NULL);
EditURLEncode(Globals.hwndEdit);
- EndWaitCursor();
}
break;
case IDM_EDIT_URLDECODE:
{
- BeginWaitCursor(NULL);
EditURLDecode(Globals.hwndEdit);
- EndWaitCursor();
}
break;
case IDM_EDIT_ESCAPECCHARS:
{
- BeginWaitCursor(NULL);
EditEscapeCChars(Globals.hwndEdit);
- EndWaitCursor();
}
break;
case IDM_EDIT_UNESCAPECCHARS:
{
- BeginWaitCursor(NULL);
EditUnescapeCChars(Globals.hwndEdit);
- EndWaitCursor();
}
break;
@@ -9224,7 +9154,7 @@ bool FileIO(bool fLoad,LPWSTR pszFileName,
FormatLngStringW(tch, COUNTOF(tch), (fLoad) ? IDS_MUI_LOADFILE : IDS_MUI_SAVEFILE, PathFindFileName(pszFileName));
bool fSuccess = false;
- BeginWaitCursor(tch);
+ BeginWaitCursor(true,tch);
if (fLoad) {
fSuccess = EditLoadFile(Globals.hwndEdit,pszFileName,bSkipUnicodeDetect,bSkipANSICPDetection,bForceEncDetection,bSetSavePoint,status);
@@ -9254,6 +9184,7 @@ bool FileIO(bool fLoad,LPWSTR pszFileName,
return(fSuccess);
}
+
//=============================================================================
//
// ConsistentIndentationCheck()
@@ -9276,10 +9207,8 @@ bool ConsistentIndentationCheck(EditFileIOStatus* status)
bool const backSpcUnindents = SciCall_GetBackSpaceUnIndents();
SciCall_SetBackSpaceUnIndents(true);
- BeginWaitCursor(NULL);
EditIndentBlock(Globals.hwndEdit, SCI_TAB, true, true);
EditIndentBlock(Globals.hwndEdit, SCI_BACKTAB, true, true);
- EndWaitCursor();
SciCall_SetUseTabs(useTabs);
SciCall_SetTabIndents(tabIndents);
@@ -9450,7 +9379,7 @@ bool FileLoad(bool bDontSave, bool bNew, bool bReload,
bool bUnknownLexer = s_flagLexerSpecified;
- BeginWaitCursor(L"Styling...");
+ BeginWaitCursor(true,L"Styling...");
if (fSuccess)
{
diff --git a/src/Notepad3.h b/src/Notepad3.h
index 2f39c9487..3d98ceea2 100644
--- a/src/Notepad3.h
+++ b/src/Notepad3.h
@@ -116,8 +116,6 @@ bool InitApplication(HINSTANCE hInstance);
HWND InitInstance(HINSTANCE hInstance, LPCWSTR pszCmdLine, int nCmdShow);
WININFO GetFactoryDefaultWndPos(const int flagsPos);
WININFO GetWinInfoByFlag(const int flagsPos);
-void BeginWaitCursor(LPCWSTR text);
-void EndWaitCursor();
bool ActivatePrevInst();
bool RelaunchMultiInst();
bool RelaunchElevated(LPWSTR lpNewCmdLnArgs);
@@ -205,12 +203,8 @@ void ObserveNotifyChangeEvent();
#define _OBSERVE_NOTIFY_CHANGE_ } __finally { ObserveNotifyChangeEvent(); }
-#define BeginWaitCursor(text) __try { SciCall_SetCursor(SC_CURSORWAIT); \
- StatusSetText(Globals.hwndStatus, STATUS_HELP, (text));
-
-#define EndWaitCursor() } __finally { SciCall_SetCursor(SC_CURSORNORMAL); \
- POINT pt; GetCursorPos(&pt); SetCursorPos(pt.x, pt.y); \
- UpdateStatusbar(true); }
+#define BeginWaitCursor(cond,text) if (cond) { __try { SciCall_SetCursor(SC_CURSORWAIT); StatusSetText(Globals.hwndStatus, STATUS_HELP, (text));
+#define EndWaitCursor() } __finally { SciCall_SetCursor(SC_CURSORNORMAL); POINT pt; GetCursorPos(&pt); SetCursorPos(pt.x, pt.y); UpdateStatusbar(true); } }
#define COND_SHOW_ZOOM_CALLTIP() { if (SciCall_GetZoom() != 100) { ShowZoomCallTip(); } }
diff --git a/src/VersionEx.h b/src/VersionEx.h
index 8499715e7..545db720d 100644
--- a/src/VersionEx.h
+++ b/src/VersionEx.h
@@ -9,11 +9,11 @@
#define VERSION_MAJOR 5
#define VERSION_MINOR 20
#define VERSION_REV 417
-#define VERSION_BUILD 1
+#define VERSION_BUILD 2
#define SCINTILLA_VER 432
#define ONIGURUMA_REGEX_VER 6.9.5
#define UCHARDET_VER 2018.09.27
#define TINYEXPR_VER 2018.05.11
#define UTHASH_VER 2.1.0
#define VERSION_PATCH BETA
-#define VERSION_COMMIT_ID t7820-rk
+#define VERSION_COMMIT_ID nebukadn