mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-24 17:50:15 +09:00
Merge pull request #110 from onodera-punpun/indentchar
Add indentation character option(s).
This commit is contained in:
@@ -74,6 +74,7 @@ func DefaultSettings() map[string]interface{} {
|
||||
return map[string]interface{}{
|
||||
"colorscheme": "default",
|
||||
"tabsize": float64(4),
|
||||
"indentchar": " ",
|
||||
"autoindent": true,
|
||||
"syntax": true,
|
||||
"tabsToSpaces": false,
|
||||
|
||||
@@ -547,7 +547,12 @@ func (v *View) DisplayView() {
|
||||
}
|
||||
|
||||
if ch == '\t' {
|
||||
screen.SetContent(x+tabchars, lineN, ' ', nil, lineStyle)
|
||||
lineIndentStyle := defStyle
|
||||
if style, ok := colorscheme["indent-char"]; ok {
|
||||
lineIndentStyle = style
|
||||
}
|
||||
indentChar := []rune(settings["indentchar"].(string))
|
||||
screen.SetContent(x+tabchars, lineN, indentChar[0], nil, lineIndentStyle)
|
||||
tabSize := int(settings["tabsize"].(float64))
|
||||
for i := 0; i < tabSize-1; i++ {
|
||||
tabchars++
|
||||
|
||||
Reference in New Issue
Block a user