Skip to content

Commit 9a914aa

Browse files
committed
protip tweaks
1 parent 7862e31 commit 9a914aa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/cmd/protip/protip.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ loop:
104104
"To merge a PR, review it until",
105105
"it is approved.",
106106
}
107-
drawProtip(s, opts.Sprite.Width+2, style, tipLines)
107+
drawProtip(s, opts.Sprite.Width, 1, style, tipLines)
108108
s.Show()
109109
}
110110

@@ -113,7 +113,7 @@ loop:
113113
return nil
114114
}
115115

116-
func drawProtip(s tcell.Screen, startX int, st tcell.Style, tipLines []string) {
116+
func drawProtip(s tcell.Screen, startX, startY int, st tcell.Style, tipLines []string) {
117117
// Should look like this:
118118
/*
119119
@@ -147,9 +147,9 @@ func drawProtip(s tcell.Screen, startX int, st tcell.Style, tipLines []string) {
147147
topBorder += "-*"
148148
bottomBorder += "_*"
149149

150-
emitStr(s, startX, 0, st, topBorder)
150+
emitStr(s, startX, startY, st, topBorder)
151151

152-
y := 1
152+
y := startY + 1
153153

154154
for iy, line := range tipLines {
155155
emitStr(s, startX, y+iy, st, pad(line))

0 commit comments

Comments
 (0)