[BUG_FIXED] Fixed status bar displaying "-2 char" issue for a empty document.

[BUG_FIXED] Fixed installation of NppShell64 failed issue in installer.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@550 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
Don Ho 2009-10-11 23:51:45 +00:00
parent c36ad90e30
commit cc3ce1a5a4
2 changed files with 5 additions and 5 deletions

View File

@ -484,7 +484,7 @@ Section "Context Menu Entry" explorerContextMenu
SetOverwrite try
SetOutPath "$INSTDIR\"
${If} ${RunningX64}
File /oname=$INSTDIR\nppcm.dll "..\bin\NppShell64.dll"
File /oname=$INSTDIR\NppShell.dll "..\bin\NppShell64.dll"
${Else}
File "..\bin\NppShell.dll"
${EndIf}

View File

@ -5232,11 +5232,11 @@ size_t Notepad_plus::getCurrentDocCharCount(size_t numLines, UniMode u)
{
if (u != uniUTF8 && u != uniCookie)
{
size_t result = _pEditView->execute(SCI_GETLENGTH);
size_t lines = numLines;
if (_pEditView->execute(SCI_GETCHARAT, result-1) >= ' ') lines--;
int result = _pEditView->execute(SCI_GETLENGTH);
size_t lines = numLines==0?0:numLines-1;
if (_pEditView->execute(SCI_GETEOLMODE) == SC_EOL_CRLF) lines *= 2;
return result - lines;
result -= lines;
return ((int)result < 0)?0:result;
}
else
{