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

Function UpdateLineNumberWidth

src/Notepad2.c:5366–5382  ·  view source on GitHub ↗

============================================================================= UpdateLineNumberWidth()

Source from the content-addressed store, hash-verified

5364//
5365//
5366void UpdateLineNumberWidth()
5367{
5368 char tchLines[32];
5369 int iLineMarginWidthNow;
5370 int iLineMarginWidthFit;
5371 if ( bShowLineNumbers ) {
5372 wsprintfA ( tchLines, "_%i_", SendMessage ( hwndEdit, SCI_GETLINECOUNT, 0, 0 ) );
5373 iLineMarginWidthNow = ( int ) SendMessage ( hwndEdit, SCI_GETMARGINWIDTHN, 0, 0 );
5374 iLineMarginWidthFit = ( int ) SendMessage ( hwndEdit, SCI_TEXTWIDTH, STYLE_LINENUMBER, ( LPARAM ) tchLines );
5375 if ( iLineMarginWidthNow != iLineMarginWidthFit ) {
5376 //SendMessage(hwndEdit,SCI_SETMARGINWIDTHN,0,0);
5377 SendMessage ( hwndEdit, SCI_SETMARGINWIDTHN, 0, iLineMarginWidthFit );
5378 }
5379 } else {
5380 SendMessage ( hwndEdit, SCI_SETMARGINWIDTHN, 0, 0 );
5381 }
5382}
5383//=============================================================================
5384//
5385// FileIO()

Callers 6

Style_ConfigDlgProcFunction · 0.85
HL_Msg_createFunction · 0.85
MsgCommandFunction · 0.85
MsgNotifyFunction · 0.85
_FileLoadFunction · 0.85
FileSaveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected