Initial Commit

This commit is contained in:
2025-06-03 16:59:39 +03:00
commit 6b5e6e8996
12 changed files with 602 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
package main
import (
"github.com/gdamore/tcell"
"strconv"
"strings"
)
func drawLineIndex(window *Window) {
screen := window.screen
buffer := window.textArea.CurrentBuffer
lineIndexStyle := tcell.StyleDefault.Foreground(tcell.ColorDimGray).Background(tcell.Color236)
_, sizeY := screen.Size()
y := 0
if window.ShowTopMenu {
y = 1
}
for lineIndex := 1; lineIndex <= strings.Count(buffer.Contents, "\n") && lineIndex < sizeY; lineIndex++ {
drawText(screen, 0, y, 3, y, lineIndexStyle, strconv.Itoa(lineIndex)+". ")
y++
}
}