diff options
author | Hubert Hirtz <hubert@hirtzfr.eu> | 2020-08-05 13:13:47 +0200 |
---|---|---|
committer | Hubert Hirtz <hubert@hirtzfr.eu> | 2020-08-05 13:13:47 +0200 |
commit | 48baa060c59728248c3dce206197e21f89579435 (patch) | |
tree | 40bb7bc71ea5260005ce48f71b91ea35ecb33128 /ui/ui.go | |
parent | Configurable highlights (diff) |
Tidying
Diffstat (limited to 'ui/ui.go')
-rw-r--r-- | ui/ui.go | 61 |
1 files changed, 0 insertions, 61 deletions
@@ -183,64 +183,3 @@ func (ui *UI) draw() { ui.bs.Draw(ui.screen) ui.screen.Show() } - -/* -func (ui *UI) drawStatus() { - st := tcell.StyleDefault - w, h := ui.screen.Size() - - x := 0 - y := h - 1 - - l := 0 - start := 0 - for _, b := range ui.bufferList.List { - if 0 < b.Highlights { - l += 3 // TODO - } - - sw := runewidth.StringWidth(b.Title) + 1 - l += sw - } - - if w < l && ui.bufferList.Current > 0 { - start = ui.bufferList.Current - 1 - } - - for i := start; i < len(ui.bufferList.List); i++ { - b := ui.bufferList.List[i] - - if i == ui.bufferList.Current { - st = st.Underline(true) - } - if 0 < b.Highlights { - st = st.Bold(true) - } - - rs := []rune(b.Title) - for _, r := range rs { - if w <= x { - break - } - - ui.screen.SetContent(x, y, r, nil, st) - x += runewidth.RuneWidth(r) - } - - if w+1 <= x { - break - } - - st = st.Normal() - - ui.screen.SetContent(x, y, ' ', nil, st) - x++ - } - - for ; x < w; x++ { - ui.screen.SetContent(x, y, ' ', nil, st) - } - - ui.screen.Show() -} -// */ |