mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-16 13:57:07 +09:00
Fix selection graphics for indentchar
This commit is contained in:
@@ -546,8 +546,18 @@ func (v *View) DisplayView() {
|
||||
if style, ok := colorscheme["indent-char"]; ok {
|
||||
lineIndentStyle = style
|
||||
}
|
||||
if v.Cursor.HasSelection() &&
|
||||
(charNum >= v.Cursor.curSelection[0] && charNum < v.Cursor.curSelection[1] ||
|
||||
charNum < v.Cursor.curSelection[0] && charNum >= v.Cursor.curSelection[1]) {
|
||||
|
||||
lineIndentStyle = tcell.StyleDefault.Reverse(true)
|
||||
|
||||
if style, ok := colorscheme["selection"]; ok {
|
||||
lineIndentStyle = style
|
||||
}
|
||||
}
|
||||
indentChar := []rune(settings["indentchar"].(string))
|
||||
screen.SetContent(x+tabchars, lineN, indentChar[0], nil, lineIndentStyle)
|
||||
screen.SetContent(x-v.leftCol+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