MCPcopy
hub / github.com/micro-editor/micro / displayStatusLine

Method displayStatusLine

internal/display/bufwindow.go:842–868  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

840}
841
842func (w *BufWindow) displayStatusLine() {
843 if w.Buf.Settings["statusline"].(bool) {
844 w.sline.Display()
845 } else if w.drawDivider {
846 divchars := config.GetGlobalOption("divchars").(string)
847 if util.CharacterCountInString(divchars) != 2 {
848 divchars = "|-"
849 }
850
851 _, _, size := util.DecodeCharacterInString(divchars)
852 divchar, combc, _ := util.DecodeCharacterInString(divchars[size:])
853
854 dividerStyle := config.DefStyle
855 if style, ok := config.Colorscheme["divider"]; ok {
856 dividerStyle = style
857 }
858
859 divreverse := config.GetGlobalOption("divreverse").(bool)
860 if divreverse {
861 dividerStyle = dividerStyle.Reverse(true)
862 }
863
864 for x := w.X; x < w.X+w.Width; x++ {
865 screen.SetContent(x, w.Y+w.Height-1, divchar, combc, dividerStyle)
866 }
867 }
868}
869
870func (w *BufWindow) displayScrollBar() {
871 if w.Buf.Settings["scrollbar"].(bool) && w.Buf.LinesNum() > w.Height {

Callers 1

DisplayMethod · 0.95

Calls 5

GetGlobalOptionFunction · 0.92
CharacterCountInStringFunction · 0.92
DecodeCharacterInStringFunction · 0.92
SetContentFunction · 0.92
DisplayMethod · 0.65

Tested by

no test coverage detected