mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-29 06:12:35 +09:00
Use the new cellview for displaying
Syntax highlighting is still not supported when using the new cellview.
This commit is contained in:
23
cmd/micro/view2.go
Normal file
23
cmd/micro/view2.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package main
|
||||
|
||||
func (v *View) DisplayView() {
|
||||
if v.Type == vtLog {
|
||||
// Log views should always follow the cursor...
|
||||
v.Relocate()
|
||||
}
|
||||
|
||||
height := v.Height
|
||||
width := v.Width
|
||||
left := v.leftCol
|
||||
top := v.Topline
|
||||
|
||||
v.cellview.Draw(v.Buf, top, height, left, width)
|
||||
|
||||
for _, line := range v.cellview.lines {
|
||||
for _, char := range line {
|
||||
if char != nil {
|
||||
screen.SetContent(char.visualLoc.X, char.visualLoc.Y, char.char, nil, char.style)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user