diff --git a/internal/config/settings.go b/internal/config/settings.go index 18f7d85bb..c19e411ea 100644 --- a/internal/config/settings.go +++ b/internal/config/settings.go @@ -353,6 +353,9 @@ var DefaultGlobalOnlySettings = map[string]interface{}{ "multiopen": "tab", "parsecursor": false, "paste": false, + "savehistory": true, + "scrollbarchar": "|", + "sucmd": "sudo", "pluginchannels": []string{"https://raw.githubusercontent.com/micro-editor/plugin-channel/master/channel.json"}, "pluginrepos": []string{}, "savehistory": true, diff --git a/internal/display/bufwindow.go b/internal/display/bufwindow.go index 593bf7b76..fde209695 100644 --- a/internal/display/bufwindow.go +++ b/internal/display/bufwindow.go @@ -767,8 +767,14 @@ func (w *BufWindow) displayScrollBar() { scrollBarStyle = style } + scrollBarChar := config.GetGlobalOption("scrollbarchar").(string) + if util.CharacterCountInString(scrollBarChar) != 1 { + scrollBarChar = "|" + } + scrollBarRune := []rune(scrollBarChar) + for y := barstart; y < util.Min(barstart+barsize, w.Y+w.bufHeight); y++ { - screen.SetContent(scrollX, y, '|', nil, scrollBarStyle) + screen.SetContent(scrollX, y, scrollBarRune[0], nil, scrollBarStyle) } } } diff --git a/runtime/help/options.md b/runtime/help/options.md index d04ab994a..791d52ff9 100644 --- a/runtime/help/options.md +++ b/runtime/help/options.md @@ -311,6 +311,10 @@ Here are the available options: default value: `false` +* `scrollbarchar`: specifies the character used for displaying the scrollbar + + default value: `|` + * `scrollmargin`: margin at which the view starts scrolling when the cursor approaches the edge of the view.