mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-22 21:34:58 +02:00
Fix delay because of folding tests.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@295 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
4ae42c5654
commit
45c7e78024
@ -1799,22 +1799,33 @@ BOOL Notepad_plus::notify(SCNotification *notification)
|
|||||||
|
|
||||||
case SCN_MODIFIED:
|
case SCN_MODIFIED:
|
||||||
{
|
{
|
||||||
if ((notification->modificationType & SC_MOD_DELETETEXT) || (notification->modificationType & SC_MOD_INSERTTEXT))
|
static bool prevWasEdit = false;
|
||||||
|
if (notification->modificationType & (SC_MOD_DELETETEXT | SC_MOD_INSERTTEXT))
|
||||||
{
|
{
|
||||||
|
prevWasEdit = true;
|
||||||
_linkTriggered = true;
|
_linkTriggered = true;
|
||||||
_isDocModifing = true;
|
_isDocModifing = true;
|
||||||
::InvalidateRect(notifyView->getHSelf(), NULL, TRUE);
|
::InvalidateRect(notifyView->getHSelf(), NULL, TRUE);
|
||||||
}
|
}
|
||||||
if (notification->modificationType & SC_MOD_CHANGEFOLD)
|
if (notification->modificationType & SC_MOD_CHANGEFOLD)
|
||||||
{
|
{
|
||||||
notifyView->foldChanged(notification->line,
|
if (prevWasEdit) {
|
||||||
notification->foldLevelNow, notification->foldLevelPrev);
|
notifyView->foldChanged(notification->line,
|
||||||
|
notification->foldLevelNow, notification->foldLevelPrev);
|
||||||
|
prevWasEdit = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (!(notification->modificationType & (SC_MOD_DELETETEXT | SC_MOD_INSERTTEXT)))
|
||||||
|
{
|
||||||
|
prevWasEdit = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SCN_SAVEPOINTREACHED:
|
case SCN_SAVEPOINTREACHED:
|
||||||
case SCN_SAVEPOINTLEFT: {
|
case SCN_SAVEPOINTLEFT:
|
||||||
|
{
|
||||||
Buffer * buf = 0;
|
Buffer * buf = 0;
|
||||||
if (isFromPrimary) {
|
if (isFromPrimary) {
|
||||||
buf = _mainEditView.getCurrentBuffer();
|
buf = _mainEditView.getCurrentBuffer();
|
||||||
@ -2159,7 +2170,7 @@ BOOL Notepad_plus::notify(SCNotification *notification)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
case SCN_MARGINCLICK:
|
case SCN_MARGINCLICK:
|
||||||
{
|
{
|
||||||
if (notification->nmhdr.hwndFrom == _mainEditView.getHSelf())
|
if (notification->nmhdr.hwndFrom == _mainEditView.getHSelf())
|
||||||
switchEditViewTo(MAIN_VIEW);
|
switchEditViewTo(MAIN_VIEW);
|
||||||
@ -2228,7 +2239,7 @@ BOOL Notepad_plus::notify(SCNotification *notification)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case TTN_GETDISPINFO:
|
case TTN_GETDISPINFO:
|
||||||
{
|
{
|
||||||
LPTOOLTIPTEXT lpttt;
|
LPTOOLTIPTEXT lpttt;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user