Skip to content

Commit

Permalink
blanking detail
Browse files Browse the repository at this point in the history
  • Loading branch information
kristofer committed Nov 25, 2018
1 parent c8cb241 commit 31f7603
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 20 deletions.
7 changes: 1 addition & 6 deletions ToDo.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
# To Do

* search commented out

* move all the buffer.go stuff to GapBuffer

* scrolling thru file
* IO at message line
* never move past the last window line
* mouse to change windows
20 changes: 6 additions & 14 deletions tkg/editor.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,9 @@ func (e *Editor) Display(wp *Window, flag bool) {
r++
}
}
for k := r; k < wp.TopPt+wp.Rows+1; k++ {
e.blankFrom(k, 0)
}

buffer2Window(wp)
e.ModeLine(wp)
Expand Down Expand Up @@ -429,11 +432,9 @@ func (e *Editor) ModeLine(wp *Window) {
mch = '*'
}
och = lch
temp := fmt.Sprintf("%c%c%c kg: %c%c %s wp(%d,%d) (h %d, w%d) rows %d", lch, och, mch, lch, lch,
temp := fmt.Sprintf("%c%c%c kg: %c%c %s wp(%d,%d)", lch, och, mch, lch, lch,
e.GetBufferName(wp.Buffer),
wp.Col, wp.Row,
//c, r,
e.Lines, e.Cols, wp.TopPt+wp.Rows)
wp.Col, wp.Row)
x := 0
y := wp.TopPt + wp.Rows + 1
for _, c := range temp {
Expand Down Expand Up @@ -528,6 +529,7 @@ func (e *Editor) nextBuffer() {
e.CurrentBuffer = e.RootBuffer
}
e.CurrentWindow.AssociateBuffer(e.CurrentBuffer)
e.CurrentBuffer.Reframe = true
}
}

Expand Down Expand Up @@ -676,13 +678,3 @@ func (e *Editor) freeOtherWindows() {
e.CurrentWindow = winp
winp.OneWindow()
}

// PointUp attempt for new PointUp
func (e *Editor) PointUp() {
// urbp->b_point = lncolumn(curbp, upup(curbp, curbp->b_point),curbp->b_col);
bp := e.CurrentBuffer
pt := bp.Point()
c1 := bp.ColumnForPoint(pt)
npt := bp.UpUp(pt, c1)
bp.SetPointAndCursor(npt)
}

0 comments on commit 31f7603

Please sign in to comment.