mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-30 14:47:16 +09:00
Start working on splits
This commit is contained in:
@@ -48,6 +48,10 @@ func NewInfoWindow(b *info.InfoBuf) *InfoWindow {
|
||||
return iw
|
||||
}
|
||||
|
||||
func (i *InfoWindow) Resize(w, h int) {
|
||||
i.width = w
|
||||
}
|
||||
|
||||
// func (i *InfoWindow) YesNoPrompt() (bool, bool) {
|
||||
// for {
|
||||
// i.Clear()
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package display
|
||||
|
||||
import (
|
||||
"log"
|
||||
"strconv"
|
||||
"unicode/utf8"
|
||||
|
||||
@@ -29,6 +30,7 @@ type Window interface {
|
||||
GetView() *View
|
||||
SetView(v *View)
|
||||
GetMouseLoc(vloc buffer.Loc) buffer.Loc
|
||||
Resize(w, h int)
|
||||
}
|
||||
|
||||
// The BufWindow provides a way of displaying a certain section
|
||||
@@ -65,6 +67,11 @@ func (v *View) SetView(view *View) {
|
||||
v = view
|
||||
}
|
||||
|
||||
func (w *BufWindow) Resize(width, height int) {
|
||||
w.Width, w.Height = width, height
|
||||
w.lineHeight = make([]int, height)
|
||||
}
|
||||
|
||||
func (w *BufWindow) getStartInfo(n, lineN int) ([]byte, int, int, *tcell.Style) {
|
||||
tabsize := util.IntOpt(w.Buf.Settings["tabsize"])
|
||||
width := 0
|
||||
@@ -431,6 +438,7 @@ func (w *BufWindow) displayBuffer() {
|
||||
nColsBeforeStart--
|
||||
}
|
||||
|
||||
log.Println(len(w.lineHeight), vloc.Y)
|
||||
w.lineHeight[vloc.Y] = bloc.Y
|
||||
|
||||
totalwidth := w.StartCol - nColsBeforeStart
|
||||
|
||||
Reference in New Issue
Block a user