mirror of
https://github.com/felixangell/phi.git
synced 2024-10-26 17:18:31 +03:00
you can now toggle line numbers from displaying, fixes #28
This commit is contained in:
parent
b9ed186212
commit
8b3ec8dda9
@ -114,6 +114,7 @@ type EditorConfig struct {
|
||||
Highlight_Line bool
|
||||
Font_Face string
|
||||
Font_Size int
|
||||
Show_Line_Numbers bool
|
||||
}
|
||||
|
||||
func NewDefaultConfig() *TomlConfig {
|
||||
|
@ -7,6 +7,7 @@ tabs_are_spaces = true
|
||||
match_braces = false
|
||||
maintain_indentation = true
|
||||
highlight_line = true
|
||||
show_line_numbers = true
|
||||
|
||||
[render]
|
||||
aliased = true
|
||||
|
@ -9,6 +9,7 @@ maintain_indentation = true
|
||||
highlight_line = true
|
||||
font_face = "Courier New Bold"
|
||||
font_size = 20
|
||||
show_line_numbers = true
|
||||
|
||||
[render]
|
||||
aliased = true
|
||||
|
@ -7,6 +7,7 @@ tabs_are_spaces = true
|
||||
match_braces = false
|
||||
maintain_indentation = true
|
||||
highlight_line = true
|
||||
show_line_numbers = true
|
||||
|
||||
[render]
|
||||
aliased = true
|
||||
|
@ -890,7 +890,7 @@ func (b *Buffer) renderAt(ctx *strife.Renderer, rx int, ry int) {
|
||||
last_w, last_h = ctx.String(string(char), ex+(rx+((x_col-1)*last_w)), (ry + (y_col * last_h)))
|
||||
}
|
||||
|
||||
{
|
||||
if b.cfg.Editor.Show_Line_Numbers {
|
||||
gutterPadPx := 10
|
||||
numLinesWidth := len(string(numLines)) + 1
|
||||
gutterWidth := last_w*numLinesWidth + (gutterPadPx * 2)
|
||||
|
Loading…
Reference in New Issue
Block a user