mirror of
https://github.com/zyedidia/micro.git
synced 2026-02-09 00:20:19 +09:00
Minor fix to current line num style
This commit is contained in:
@@ -582,12 +582,13 @@ func (v *View) DisplayView() {
|
||||
if settings["ruler"] == true {
|
||||
// Write the line number
|
||||
lineNumStyle := defStyle
|
||||
curLineNumStyle := defStyle
|
||||
if style, ok := colorscheme["line-number"]; ok {
|
||||
lineNumStyle = style
|
||||
}
|
||||
if style, ok := colorscheme["current-line-number"]; ok {
|
||||
curLineNumStyle = style
|
||||
if curLineN == v.Cursor.Y {
|
||||
lineNumStyle = style
|
||||
}
|
||||
}
|
||||
|
||||
lineNum := strconv.Itoa(curLineN + 1)
|
||||
@@ -599,11 +600,7 @@ func (v *View) DisplayView() {
|
||||
}
|
||||
// Write the actual line number
|
||||
for _, ch := range lineNum {
|
||||
if curLineN == v.Cursor.Y {
|
||||
v.drawCell(screenX, screenY, ch, nil, curLineNumStyle)
|
||||
} else {
|
||||
v.drawCell(screenX, screenY, ch, nil, lineNumStyle)
|
||||
}
|
||||
v.drawCell(screenX, screenY, ch, nil, lineNumStyle)
|
||||
screenX++
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user