1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

[WTF-53] Closes #53. Todo display properly pads line lengths.

[WTF-53]
This commit is contained in:
Chris Cummer
2018-05-26 21:18:06 -07:00
parent 07c1031887
commit dcfacd9510
2 changed files with 18 additions and 5 deletions

View File

@@ -83,10 +83,8 @@ func OpenFile(path string) {
// PadRow returns a padding for a row to make it the full width of the containing widget.
// Useful for ensurig row highlighting spans the full width (I suspect tcell has a better
// way to do this, but I haven't yet found it)
func PadRow(offset int, view *tview.TextView) string {
_, _, w, _ := view.GetInnerRect()
padSize := w - offset
func PadRow(offset int, max int) string {
padSize := max - offset
if padSize < 0 {
padSize = 0
}