Merge remote-tracking branch 'notepad3_orig_rizone/master'

This commit is contained in:
Rainer Kottenhoff 2017-10-08 20:44:35 +02:00
commit ca2e2abf28
13 changed files with 48 additions and 39 deletions

6
.gitignore vendored
View File

@ -29,9 +29,7 @@ Thumbs.db
/Build/.vs
/Build/Packages
/Build/temp_zip*
/distrib/Notepad3.*.exe
distrib/Notepad3-0.2.1.213.exe
distrib/Notepad3-0.2.2.225.exe
/distrib/Notepad3*.exe
Build/Bin/Password.txt
Build/Bin/Certum.cer
Build/Bin/Certum.p12
@ -42,4 +40,4 @@ Build/Signing/kSign.exe
Build/Signing/kSignCMD.exe
Build/Signing/Password.txt
Notepad3.VC.db
Notepad3.VC.VC.opendb
Notepad3.VC.VC.opendb

View File

@ -1 +1 @@
549
569

View File

@ -2,6 +2,29 @@
Rizonesoft Notepad3 CHANGES
==================================================
--------------------------------------------------
Version 2 Build 568 (8 October 2017)
--------------------------------------------------
~ Prettier Browse Icon.
~ Fix: Reverting "reload as UTF-8 not work bugfix".
~ Fix: Texture glitch on "Browse" button.
~ Updated the Run Dialog icon.
~ Fix: Binary directory to build portable app.
~ Code comment for completeness.
~ Fix: In-text encoding (convert encoding).
~ Fix: minor StatusBar string corrections.
~ StatusBar information enhancements.
~ Fix: Support pasting position at virtual space.
~ Fix: Move caret to convenient position after pasting clipboard
(no current selection).
~ Fix: Virtual space navigation and rectangular selection (minor issues)
(allow "Virtual Space Rectangular Selection"
also allows moving Caret into virtual space (beyond line end))
~ Fix: Copy/Cut & Paste of current line (in case of no selection -
Visual Studio behavior - using SCI's MSDEVLineSelect).
~ Enhanced clipboard recoding detection.
~ Fix: Bug in code-page related text conversion.
--------------------------------------------------
Version 2 Build 548 (3 October 2017)
--------------------------------------------------

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 B

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
minipath/res/Open2.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 B

View File

@ -3,7 +3,7 @@
<assemblyIdentity
name="Notepad3"
processorArchitecture="*"
version="2.17.1003.548"
version="2.17.1008.568"
type="win32"
/>
<description>Notepad3</description>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 B

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
res/Open2.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 B

View File

@ -283,6 +283,7 @@ HWND EditCreate(HWND hwndParent)
g_hInstance,
NULL);
Encoding_Current(iDefaultEncoding);
Encoding_SciSetCodePage(hwnd,iDefaultEncoding);
SendMessage(hwnd,SCI_SETEOLMODE,SC_EOL_CRLF,0);
SendMessage(hwnd,SCI_SETPASTECONVERTENDINGS,TRUE,0);
@ -1568,32 +1569,16 @@ BOOL EditLoadFile(
BOOL *pbUnicodeErr,
BOOL *pbFileTooBig)
{
HANDLE hFile;
DWORD dwFileSize;
DWORD dwFileSizeLimit;
DWORD dwBufSize;
BOOL bReadSuccess;
char* lpData;
DWORD cbData;
BOOL bReverse = FALSE;
BOOL bPreferOEM = FALSE;
*iEncoding = CPI_ANSI_DEFAULT;
*pbUnicodeErr = FALSE;
*pbFileTooBig = FALSE;
hFile = CreateFile(pszFile,
GENERIC_READ,
FILE_SHARE_READ|FILE_SHARE_WRITE,
NULL,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
NULL);
HANDLE hFile = CreateFile(pszFile,
GENERIC_READ,
FILE_SHARE_READ|FILE_SHARE_WRITE,
NULL,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
NULL);
dwLastIOError = GetLastError();
if (hFile == INVALID_HANDLE_VALUE) {
@ -1603,11 +1588,11 @@ BOOL EditLoadFile(
}
// calculate buffer limit
dwFileSize = GetFileSize(hFile,NULL);
dwBufSize = dwFileSize + 16;
DWORD dwFileSize = GetFileSize(hFile,NULL);
DWORD dwBufSize = dwFileSize + 16;
// Check if a warning message should be displayed for large files
dwFileSizeLimit = IniGetInt(L"Settings2",L"FileLoadWarningMB",1);
DWORD dwFileSizeLimit = IniGetInt(L"Settings2",L"FileLoadWarningMB",1);
if (dwFileSizeLimit != 0 && dwFileSizeLimit * 1024 * 1024 < dwFileSize) {
if (InfoBox(MBYESNO,L"MsgFileSizeWarning",IDS_WARNLOADBIGFILE) != IDYES) {
CloseHandle(hFile);
@ -1618,7 +1603,7 @@ BOOL EditLoadFile(
}
}
lpData = GlobalAlloc(GPTR,dwBufSize);
char* lpData = GlobalAlloc(GPTR,dwBufSize);
dwLastIOError = GetLastError();
if (!lpData)
@ -1630,7 +1615,8 @@ BOOL EditLoadFile(
return FALSE;
}
bReadSuccess = ReadAndDecryptFile(hwnd, hFile, (DWORD)GlobalSize(lpData) - 2, &lpData, &cbData);
DWORD cbData = 0L;
BOOL bReadSuccess = ReadAndDecryptFile(hwnd, hFile, (DWORD)GlobalSize(lpData) - 2, &lpData, &cbData);
dwLastIOError = GetLastError();
CloseHandle(hFile);
@ -1641,6 +1627,7 @@ BOOL EditLoadFile(
return FALSE;
}
BOOL bPreferOEM = FALSE;
if (bLoadNFOasOEM)
{
PCWSTR pszExt = pszFile + StringCchLenN(pszFile,MAX_PATH) - 4;
@ -1653,6 +1640,8 @@ BOOL EditLoadFile(
_iPrefEncoding = Encoding_SrcWeak(CPI_GET);
BOOL bBOM = FALSE;
BOOL bReverse = FALSE;
const int iSrcEnc = Encoding_Source(CPI_GET);
if (cbData == 0) {
@ -1737,13 +1726,12 @@ BOOL EditLoadFile(
((IsUTF8Signature(lpData) ||
FileVars_IsUTF8(&fvCurFile) ||
(iSrcEnc == CPI_UTF8 || iSrcEnc == CPI_UTF8SIGN) ||
(!bPreferOEM && bLoadASCIIasUTF8) ||
(IsUTF8(lpData,cbData) &&
(((UTF8_mbslen_bytes(UTF8StringStart(lpData)) - 1 !=
UTF8_mbslen(UTF8StringStart(lpData),IsUTF8Signature(lpData) ? cbData-3 : cbData)) ||
(!bPreferOEM && (
mEncoding[_iPrefEncoding].uFlags & NCP_UTF8
)) ))))) && !(FileVars_IsNonUTF8(&fvCurFile) &&
mEncoding[_iPrefEncoding].uFlags & NCP_UTF8 ||
bLoadASCIIasUTF8))))))) && !(FileVars_IsNonUTF8(&fvCurFile) &&
(iSrcEnc != CPI_UTF8 && iSrcEnc != CPI_UTF8SIGN)))
{
Encoding_SciSetCodePage(hwnd,CPI_UTF8);

Binary file not shown.

View File

@ -1,5 +1,5 @@
#define VERSION_MAJOR 2
#define VERSION_MINOR 17
#define VERSION_REV 1003
#define VERSION_BUILD 548
#define VERSION_REV 1008
#define VERSION_BUILD 568
#define SCINTILLA_VER 400