DynamicLineNumbers2.diff

Fix for breakpoint annotation & more than 10000 lines are supported - Zbigniew Rebacz, 01/07/2015 11:56 PM

Download (1.01 KB)

View differences:

CodeEditor/EditorBar.cpp (kopia robocza)
88 88
		if(editor->GetCaret().top == y && editor->barline)
89 89
			w.DrawRect(0, y, sz.cx, fy, Blend(SColorHighlight(), SColorLtFace(), 200));
90 90
		if(line_numbers && i < editor->GetLineCount()) {
91
			String n = AsString((i + 1) % 10000);
91
			String n = AsString((i + 1) % 1000000);
92 92
			Font fnt = editor->GetFont();
93 93
			Size tsz = GetTextSize(n, fnt);
94
			w.DrawText(sz.cx - 8 - 12 - tsz.cx, y + (fy - tsz.cy) / 2, n, fnt, Brown);
94
			w.DrawText(sz.cx - 4 - 12 - tsz.cx, y + (fy - tsz.cy) / 2, n, fnt, Brown);
95 95
		}
96 96
		if(hi_if) {
97 97
			Vector<IfState> nextif;
......
484 484
		i++;
485 485
		n /= 10;
486 486
	}
487
	int w = (line_numbers && editor ? editor->GetFont()['0'] * i + 14 : 12) + annotations;
487
	int w = (line_numbers && editor ? editor->GetFont()['0'] * i : 0) + 12 + 4 + annotations;
488 488
	if(w != GetWidth()) {
489 489
		Width(w);
490 490
		Refresh();