mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-11 23:22:41 +09:00
Update screenshot and status line
This commit is contained in:
@@ -40,9 +40,9 @@ func (sline *Statusline) Display() {
|
||||
// Add the filetype
|
||||
file += " " + sline.view.buf.filetype
|
||||
|
||||
centerText := "Press Ctrl-g to open help"
|
||||
rightText := "Ctrl-g for help "
|
||||
if helpOpen {
|
||||
centerText = "Press Ctrl-g to close help"
|
||||
rightText = "Ctrl-g to close help "
|
||||
}
|
||||
|
||||
statusLineStyle := defStyle.Reverse(true)
|
||||
@@ -55,8 +55,8 @@ func (sline *Statusline) Display() {
|
||||
for x := 0; x < sline.view.width; x++ {
|
||||
if x < len(fileRunes) {
|
||||
screen.SetContent(x, y, fileRunes[x], nil, statusLineStyle)
|
||||
} else if x >= sline.view.width/2-len(centerText)/2 && x < len(centerText)+sline.view.width/2-len(centerText)/2 {
|
||||
screen.SetContent(x, y, []rune(centerText)[x-sline.view.width/2+len(centerText)/2], nil, statusLineStyle)
|
||||
} else if x >= sline.view.width-len(rightText) && x < len(rightText)+sline.view.width-len(rightText) {
|
||||
screen.SetContent(x, y, []rune(rightText)[x-sline.view.width+len(rightText)], nil, statusLineStyle)
|
||||
} else {
|
||||
screen.SetContent(x, y, ' ', nil, statusLineStyle)
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
)
|
||||
|
||||
// The View struct stores information about a view into a buffer.
|
||||
// It has a stores information about the cursor, and the viewport
|
||||
// It stores information about the cursor, and the viewport
|
||||
// that the user sees the buffer from.
|
||||
type View struct {
|
||||
cursor Cursor
|
||||
|
||||
Reference in New Issue
Block a user