// We'll draw the line at the lowest line in the window
y := s.win.Height + s.win.Y - 1
+ winX := s.win.X
+
b := s.win.Buf
// autocomplete suggestions (for the buffer, not for the infowindow)
if b.HasSuggestions && len(b.Suggestions) > 1 {
if style, ok := config.Colorscheme["statusline"]; ok {
statusLineStyle = style
}
- keymenuOffset := 0
- if config.GetGlobalOption("keymenu").(bool) {
- keymenuOffset = len(keydisplay)
- }
x := 0
for j, sug := range b.Suggestions {
style := statusLineStyle
style = style.Reverse(true)
}
for _, r := range sug {
- screen.SetContent(x, y-keymenuOffset, r, nil, style)
+ screen.SetContent(winX+x, y, r, nil, style)
x++
if x >= s.win.Width {
return
}
}
- screen.SetContent(x, y-keymenuOffset, ' ', nil, statusLineStyle)
+ screen.SetContent(winX+x, y, ' ', nil, statusLineStyle)
x++
if x >= s.win.Width {
return
}
for x < s.win.Width {
- screen.SetContent(x, y-keymenuOffset, ' ', nil, statusLineStyle)
+ screen.SetContent(winX+x, y, ' ', nil, statusLineStyle)
x++
}
return
leftLen := util.StringWidth(leftText, util.CharacterCount(leftText), 1)
rightLen := util.StringWidth(rightText, util.CharacterCount(rightText), 1)
- winX := s.win.X
for x := 0; x < s.win.Width; x++ {
if x < leftLen {
r, combc, size := util.DecodeCharacter(leftText)