MCPcopy Create free account
hub / github.com/ProgerXP/Notepad2e / PasteBoardTimer

Function PasteBoardTimer

src/Notepad2.c:6353–6372  ·  view source on GitHub ↗

============================================================================= PasteBoardTimer()

Source from the content-addressed store, hash-verified

6351//
6352//
6353void CALLBACK PasteBoardTimer ( HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime )
6354{
6355 if ( dwLastCopyTime > 0 && GetTickCount() - dwLastCopyTime > 200 ) {
6356 if ( SendMessage ( hwndEdit, SCI_CANPASTE, 0, 0 ) ) {
6357 BOOL bAutoIndent2 = bAutoIndent;
6358 bAutoIndent = 0;
6359 EditJumpTo ( hwndEdit, -1, 0 );
6360 SendMessage ( hwndEdit, SCI_BEGINUNDOACTION, 0, 0 );
6361 if ( SendMessage ( hwndEdit, SCI_GETLENGTH, 0, 0 ) > 0 ) {
6362 SendMessage ( hwndEdit, SCI_NEWLINE, 0, 0 );
6363 }
6364 SendMessage ( hwndEdit, SCI_PASTE, 0, 0 );
6365 SendMessage ( hwndEdit, SCI_NEWLINE, 0, 0 );
6366 SendMessage ( hwndEdit, SCI_ENDUNDOACTION, 0, 0 );
6367 EditEnsureSelectionVisible ( hwndEdit );
6368 bAutoIndent = bAutoIndent2;
6369 }
6370 dwLastCopyTime = 0;
6371 }
6372}
6373/// End of Notepad2.c \\\

Callers

nothing calls this directly

Calls 2

EditJumpToFunction · 0.85

Tested by

no test coverage detected