mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-24 06:14:47 +02:00
Fix a regression of double click on several zones of status bar.
This commit is contained in:
parent
3924190fb1
commit
1b66acd5e9
@ -49,8 +49,6 @@ BOOL Notepad_plus::notify(SCNotification *notification)
|
|||||||
notifyView = &_mainEditView;
|
notifyView = &_mainEditView;
|
||||||
else if (isFromSecondary)
|
else if (isFromSecondary)
|
||||||
notifyView = &_subEditView;
|
notifyView = &_subEditView;
|
||||||
else
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
DocTabView *notifyDocTab = isFromPrimary?&_mainDocTab:&_subDocTab;
|
DocTabView *notifyDocTab = isFromPrimary?&_mainDocTab:&_subDocTab;
|
||||||
TBHDR * tabNotification = (TBHDR*) notification;
|
TBHDR * tabNotification = (TBHDR*) notification;
|
||||||
@ -58,6 +56,9 @@ BOOL Notepad_plus::notify(SCNotification *notification)
|
|||||||
{
|
{
|
||||||
case SCN_MODIFIED:
|
case SCN_MODIFIED:
|
||||||
{
|
{
|
||||||
|
if (not notifyView)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
static bool prevWasEdit = false;
|
static bool prevWasEdit = false;
|
||||||
if (notification->modificationType & (SC_MOD_DELETETEXT | SC_MOD_INSERTTEXT))
|
if (notification->modificationType & (SC_MOD_DELETETEXT | SC_MOD_INSERTTEXT))
|
||||||
{
|
{
|
||||||
@ -543,6 +544,9 @@ BOOL Notepad_plus::notify(SCNotification *notification)
|
|||||||
|
|
||||||
case SCN_DOUBLECLICK:
|
case SCN_DOUBLECLICK:
|
||||||
{
|
{
|
||||||
|
if (not notifyView)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
if (notification->modifiers == SCMOD_CTRL)
|
if (notification->modifiers == SCMOD_CTRL)
|
||||||
{
|
{
|
||||||
const NppGUI & nppGUI = NppParameters::getInstance()->getNppGUI();
|
const NppGUI & nppGUI = NppParameters::getInstance()->getNppGUI();
|
||||||
@ -700,6 +704,9 @@ BOOL Notepad_plus::notify(SCNotification *notification)
|
|||||||
|
|
||||||
case SCN_UPDATEUI:
|
case SCN_UPDATEUI:
|
||||||
{
|
{
|
||||||
|
if (not notifyView)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
NppParameters *nppParam = NppParameters::getInstance();
|
NppParameters *nppParam = NppParameters::getInstance();
|
||||||
NppGUI & nppGui = const_cast<NppGUI &>(nppParam->getNppGUI());
|
NppGUI & nppGui = const_cast<NppGUI &>(nppParam->getNppGUI());
|
||||||
|
|
||||||
@ -820,6 +827,9 @@ BOOL Notepad_plus::notify(SCNotification *notification)
|
|||||||
|
|
||||||
case SCN_ZOOM:
|
case SCN_ZOOM:
|
||||||
{
|
{
|
||||||
|
if (not notifyView)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
ScintillaEditView * unfocusView = isFromPrimary ? &_subEditView : &_mainEditView;
|
ScintillaEditView * unfocusView = isFromPrimary ? &_subEditView : &_mainEditView;
|
||||||
_smartHighlighter.highlightView(notifyView, unfocusView);
|
_smartHighlighter.highlightView(notifyView, unfocusView);
|
||||||
break;
|
break;
|
||||||
@ -840,7 +850,11 @@ BOOL Notepad_plus::notify(SCNotification *notification)
|
|||||||
|
|
||||||
case SCN_PAINTED:
|
case SCN_PAINTED:
|
||||||
{
|
{
|
||||||
//--FLS: ViewMoveAtWrappingDisableFix: Disable wrapping messes up visible lines. Therefore save view position before in IDM_VIEW_WRAP and restore after SCN_PAINTED, as doc. says
|
if (not notifyView)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
// ViewMoveAtWrappingDisableFix: Disable wrapping messes up visible lines.
|
||||||
|
// Therefore save view position before in IDM_VIEW_WRAP and restore after SCN_PAINTED, as doc. says
|
||||||
if (_mainEditView.isWrapRestoreNeeded())
|
if (_mainEditView.isWrapRestoreNeeded())
|
||||||
{
|
{
|
||||||
_mainEditView.restoreCurrentPos();
|
_mainEditView.restoreCurrentPos();
|
||||||
@ -877,6 +891,9 @@ BOOL Notepad_plus::notify(SCNotification *notification)
|
|||||||
|
|
||||||
case SCN_HOTSPOTDOUBLECLICK:
|
case SCN_HOTSPOTDOUBLECLICK:
|
||||||
{
|
{
|
||||||
|
if (not notifyView)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
// Save the current wordChars before setting a custom list
|
// Save the current wordChars before setting a custom list
|
||||||
const size_t wordBufferSize = notifyView->execute(SCI_GETWORDCHARS);
|
const size_t wordBufferSize = notifyView->execute(SCI_GETWORDCHARS);
|
||||||
char *wordChars = new char[wordBufferSize + 1];
|
char *wordChars = new char[wordBufferSize + 1];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user