1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-15 00:15:32 +02:00

Bump gocui

This commit is contained in:
Stefan Haller
2025-02-20 09:13:54 +01:00
parent 56c9d5abeb
commit ac3824bd7c
4 changed files with 13 additions and 6 deletions

View File

@ -195,6 +195,9 @@ type View struct {
// if true, the view will underline hyperlinks only when the cursor is on
// them; otherwise, they will always be underlined
UnderlineHyperLinksOnlyOnHover bool
// number of spaces per \t character, defaults to 4
TabWidth int
}
type pos struct {
@ -424,6 +427,7 @@ func NewView(name string, x0, y0, x1, y1 int, mode OutputMode) *View {
searcher: &searcher{},
TextArea: &TextArea{},
rangeSelectStartY: -1,
TabWidth: 4,
}
v.FgColor, v.BgColor = ColorDefault, ColorDefault
@ -923,9 +927,12 @@ func (v *View) parseInput(ch rune, x int, _ int) (bool, []cell) {
return truncateLine, nil
} else if ch == '\t' {
// fill tab-sized space
const tabStop = 4
tabWidth := v.TabWidth
if tabWidth < 1 {
tabWidth = 4
}
ch = ' '
repeatCount = tabStop - (x % tabStop)
repeatCount = tabWidth - (x % tabWidth)
}
c := cell{
fgColor: v.ei.curFgColor,