[RELEASE_475] Fix invisible tabs bug while closing (Finally).

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@104 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
donho 2008-01-14 19:40:10 +00:00
parent c83d5801c9
commit 3412c5ce5d
7 changed files with 39 additions and 24 deletions

View File

@ -1,11 +1,12 @@
Notepad++ v4.7.4 fixed bugs and added features (from v4.7.4) : Notepad++ v4.7.5 fixed bugs and added features (from v4.7.3) :
1. Fix the horizon scroll bar flicker bug. 1. Fix invisible tabs bug while closing.
2. Fix the full screen (F11) bug regarding multi-display issue 2. Fix the horizon scroll bar flicker bug.
3. Explorer context menu is available under xp 64 bits et vista 64 bits. 3. Fix the full screen (F11) bug regarding multi-display issue
4. Add YAML language. 4. Explorer context menu is available under xp 64 bits et vista 64 bits.
5. Fix the crash issue of window dialog while clicking Sort button without selected item. 5. Add YAML language.
6. Enhance Sort feature GUI part - Enable Sort button only after clicking on the column tab; Disable Sort button after sorting. 6. Fix the crash issue of window dialog while clicking Sort button without selected item.
7. Enhance Sort feature GUI part - Enable Sort button only after clicking on the column tab; Disable Sort button after sorting.
Included plugins : Included plugins :

View File

@ -17,16 +17,16 @@
; Define the application name ; Define the application name
!define APPNAME "Notepad++" !define APPNAME "Notepad++"
!define APPNAMEANDVERSION "Notepad++ v4.7.4" !define APPNAMEANDVERSION "Notepad++ v4.7.5"
!define VERSION_MAJOR 4 !define VERSION_MAJOR 4
!define VERSION_MINOR 74 !define VERSION_MINOR 75
; Main Install settings ; Main Install settings
Name "${APPNAMEANDVERSION}" Name "${APPNAMEANDVERSION}"
InstallDir "$PROGRAMFILES\Notepad++" InstallDir "$PROGRAMFILES\Notepad++"
InstallDirRegKey HKLM "Software\${APPNAME}" "" InstallDirRegKey HKLM "Software\${APPNAME}" ""
OutFile "..\bin\npp.4.7.4.Installer.exe" OutFile "..\bin\npp.4.7.5.Installer.exe"
@ -485,7 +485,7 @@ GLOBAL_INST:
SectionEnd SectionEnd
Section "Context Menu Entry" explorerContextMenu Section "Context Menu Entry" explorerContextMenu
SetOverwrite on SetOverwrite try
SetOutPath "$INSTDIR\" SetOutPath "$INSTDIR\"
${If} ${RunningX64} ${If} ${RunningX64}
File /oname=$INSTDIR\nppcm.dll "..\bin\nppcm64.dll" File /oname=$INSTDIR\nppcm.dll "..\bin\nppcm64.dll"

View File

@ -119,6 +119,10 @@ const char * DocTabView::closeCurrentDoc()
int i2close = _pView->closeCurrentDoc(i2activate); int i2close = _pView->closeCurrentDoc(i2activate);
TabBar::deletItemAt(i2close); TabBar::deletItemAt(i2close);
if (i2activate > 1)
TabBar::activateAt(i2activate-1);
TabBar::activateAt(i2activate); TabBar::activateAt(i2activate);
} }
return _pView->getCurrentTitle(); return _pView->getCurrentTitle();

View File

@ -18,9 +18,9 @@
#ifndef RESOURCE_H #ifndef RESOURCE_H
#define RESOURCE_H #define RESOURCE_H
#define NOTEPAD_PLUS_VERSION "Notepad++ v4.7.4" #define NOTEPAD_PLUS_VERSION "Notepad++ v4.7.5"
#define VERSION_VALUE "4.74\0" // should be X.Y : ie. if VERSION_DIGITALVALUE == 4, 7, 1, 0 , then X = 4, Y = 71 #define VERSION_VALUE "4.75\0" // should be X.Y : ie. if VERSION_DIGITALVALUE == 4, 7, 1, 0 , then X = 4, Y = 71
#define VERSION_DIGITALVALUE 4, 7, 4, 0 #define VERSION_DIGITALVALUE 4, 7, 5, 0
#ifndef IDC_STATIC #ifndef IDC_STATIC
#define IDC_STATIC -1 #define IDC_STATIC -1

View File

@ -573,11 +573,11 @@
> >
</File> </File>
<File <File
RelativePath="..\src\resource.h" RelativePath="..\src\WinControls\Preference\resource.h"
> >
</File> </File>
<File <File
RelativePath="..\src\WinControls\Preference\resource.h" RelativePath="..\src\resource.h"
> >
</File> </File>
<File <File

View File

@ -765,6 +765,7 @@
#define SCE_YAML_DOCUMENT 6 #define SCE_YAML_DOCUMENT 6
#define SCE_YAML_TEXT 7 #define SCE_YAML_TEXT 7
#define SCE_YAML_ERROR 8 #define SCE_YAML_ERROR 8
#define SCE_YAML_OPERATOR 9
#define SCE_TEX_DEFAULT 0 #define SCE_TEX_DEFAULT 0
#define SCE_TEX_SPECIAL 1 #define SCE_TEX_SPECIAL 1
#define SCE_TEX_GROUP 2 #define SCE_TEX_GROUP 2

View File

@ -20,6 +20,10 @@
#include "Scintilla.h" #include "Scintilla.h"
#include "SciLexer.h" #include "SciLexer.h"
#ifdef SCI_NAMESPACE
using namespace Scintilla;
#endif
static const char * const yamlWordListDesc[] = { static const char * const yamlWordListDesc[] = {
"Keywords", "Keywords",
0 0
@ -33,12 +37,12 @@ static inline bool AtEOL(Accessor &styler, unsigned int i) {
static unsigned int SpaceCount(char* lineBuffer) { static unsigned int SpaceCount(char* lineBuffer) {
if (lineBuffer == NULL) if (lineBuffer == NULL)
return 0; return 0;
char* headBuffer = lineBuffer; char* headBuffer = lineBuffer;
while (*headBuffer == ' ') while (*headBuffer == ' ')
headBuffer++; headBuffer++;
return headBuffer - lineBuffer; return headBuffer - lineBuffer;
} }
@ -58,14 +62,14 @@ static void ColouriseYAMLLine(
unsigned int endPos, unsigned int endPos,
WordList &keywords, WordList &keywords,
Accessor &styler) { Accessor &styler) {
unsigned int i = 0; unsigned int i = 0;
bool bInQuotes = false; bool bInQuotes = false;
unsigned int indentAmount = SpaceCount(lineBuffer); unsigned int indentAmount = SpaceCount(lineBuffer);
if (currentLine > 0) { if (currentLine > 0) {
int parentLineState = styler.GetLineState(currentLine - 1); int parentLineState = styler.GetLineState(currentLine - 1);
if ((parentLineState&YAML_STATE_MASK) == YAML_STATE_TEXT || (parentLineState&YAML_STATE_MASK) == YAML_STATE_TEXT_PARENT) { if ((parentLineState&YAML_STATE_MASK) == YAML_STATE_TEXT || (parentLineState&YAML_STATE_MASK) == YAML_STATE_TEXT_PARENT) {
unsigned int parentIndentAmount = parentLineState&(~YAML_STATE_MASK); unsigned int parentIndentAmount = parentLineState&(~YAML_STATE_MASK);
if (indentAmount > parentIndentAmount) { if (indentAmount > parentIndentAmount) {
@ -98,7 +102,8 @@ static void ColouriseYAMLLine(
if (lineBuffer[i] == '\'' || lineBuffer[i] == '\"') { if (lineBuffer[i] == '\'' || lineBuffer[i] == '\"') {
bInQuotes = !bInQuotes; bInQuotes = !bInQuotes;
} else if (lineBuffer[i] == ':' && !bInQuotes) { } else if (lineBuffer[i] == ':' && !bInQuotes) {
styler.ColourTo(startLine + i, SCE_YAML_IDENTIFIER); styler.ColourTo(startLine + i - 1, SCE_YAML_IDENTIFIER);
styler.ColourTo(startLine + i, SCE_YAML_OPERATOR);
// Non-folding scalar // Non-folding scalar
i++; i++;
while ((i < lengthLine) && isspacechar(lineBuffer[i])) while ((i < lengthLine) && isspacechar(lineBuffer[i]))
@ -126,6 +131,10 @@ static void ColouriseYAMLLine(
styler.ColourTo(endPos, SCE_YAML_ERROR); styler.ColourTo(endPos, SCE_YAML_ERROR);
return; return;
} }
} else if (lineBuffer[i] == '#') {
styler.ColourTo(startLine + i - 1, SCE_YAML_DEFAULT);
styler.ColourTo(endPos, SCE_YAML_COMMENT);
return;
} }
styler.SetLineState(currentLine, YAML_STATE_VALUE); styler.SetLineState(currentLine, YAML_STATE_VALUE);
if (lineBuffer[i] == '&' || lineBuffer[i] == '*') { if (lineBuffer[i] == '&' || lineBuffer[i] == '*') {
@ -165,7 +174,7 @@ static void ColouriseYAMLDoc(unsigned int startPos, int length, int, WordList *k
unsigned int endPos = startPos + length; unsigned int endPos = startPos + length;
unsigned int maxPos = styler.Length(); unsigned int maxPos = styler.Length();
unsigned int lineCurrent = styler.GetLine(startPos); unsigned int lineCurrent = styler.GetLine(startPos);
for (unsigned int i = startPos; i < maxPos && i < endPos; i++) { for (unsigned int i = startPos; i < maxPos && i < endPos; i++) {
lineBuffer[linePos++] = styler[i]; lineBuffer[linePos++] = styler[i];
if (AtEOL(styler, i) || (linePos >= sizeof(lineBuffer) - 1)) { if (AtEOL(styler, i) || (linePos >= sizeof(lineBuffer) - 1)) {