Skip to content

Commit

Permalink
made line number be same width in all tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
FRex committed Dec 19, 2019
1 parent 627455d commit 62f5fa7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mainunit.pas
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ implementation

uses
StrUtils, dateutils, Math, LCLIntf, SynEditMarkupHighAll, SysUtils,
SynHighlighterAny, FileUtil;
SynHighlighterAny, FileUtil, SynGutterLineNumber;

const
LineCountPanel = 0;
Expand Down Expand Up @@ -231,6 +231,10 @@ procedure TForm1.FormCreate(Sender: TObject);
FAllLines.LoadFromFile(allnotespath);
notespanelstr := allnotespath + ' - ' + PrettyPrintFileSize(FileSize(allnotespath));
StatusBar.Panels[NotesPathSizePanel].Text := notespanelstr;
if TextEditor.Gutter.Parts.Part[1] is TSynGutterLineNumber then
(TextEditor.Gutter.Parts.Part[1] as TSynGutterLineNumber).DigitCount :=
Length(IntToStr(FAllLines.Count));

except
on EFOpenError do
MessageDlg('File not found', Format('Failed to open file: %s', [allnotespath]),
Expand Down

0 comments on commit 62f5fa7

Please sign in to comment.