Skip to content

Commit 346a4e2

Browse files
committed
Fix hotspot issue if errors occur before the console is displayed
1 parent ff683c0 commit 346a4e2

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

PythonScript/src/ConsoleDialog.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ BOOL ConsoleDialog::run_dlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM l
9494
return FALSE;
9595

9696
case SCN_HOTSPOTCLICK:
97-
case SCN_HOTSPOTDOUBLECLICK:
9897
onHotspotClick(reinterpret_cast<SCNotification*>(lParam));
9998
return FALSE;
10099
}
@@ -373,6 +372,9 @@ void ConsoleDialog::doDialog()
373372

374373

375374
::SendMessage(_hParent, NPPM_DMMREGASDCKDLG, 0, (LPARAM)&m_data);
375+
376+
// Parse the whole doc, in case we've had errors that haven't been parsed yet
377+
callScintilla(SCI_COLOURISE, 0, -1);
376378
}
377379

378380
display(true);
@@ -442,6 +444,9 @@ void ConsoleDialog::onStyleNeeded(SCNotification* notification)
442444
}
443445
}
444446

447+
// ensure that everything is set as styled (just move the endStyled variable on to the requested position)
448+
callScintilla(SCI_STARTSTYLING, notification->position, 0x0);
449+
445450
}
446451

447452
bool ConsoleDialog::parseLine(LineDetails *lineDetails)

0 commit comments

Comments
 (0)