mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-06 21:00:19 +09:00
Update screenshot and status line
This commit is contained in:
@@ -104,7 +104,7 @@ You can run `$ micro -version` to get the version number. Since there is no rele
|
||||
commit hash. The version is unknown if you built with `go get`, instead use `make install` or `make` to get a binary
|
||||
with a version number defined.
|
||||
|
||||
#### Help text
|
||||
### Help text
|
||||
|
||||
See the [help text](./runtime/help/help.md) for information about keybindings, editor commands, colorschemes and
|
||||
configuration options.
|
||||
|
||||
@@ -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
|
||||
|
||||
BIN
screenshot.png
BIN
screenshot.png
Binary file not shown.
|
Before Width: | Height: | Size: 111 KiB After Width: | Height: | Size: 108 KiB |
Reference in New Issue
Block a user