mirror of
https://github.com/zyedidia/micro.git
synced 2026-02-06 15:10:27 +09:00
Fix glitch with bottomline when softwrap is disabled
This commit is contained in:
@@ -615,6 +615,7 @@ func (v *View) DisplayView() {
|
||||
screenX, screenY := v.x, v.y-1
|
||||
|
||||
highlightStyle := defStyle
|
||||
curLineN := 0
|
||||
|
||||
// ViewLine is the current line from the top of the viewport
|
||||
for viewLine := 0; viewLine < v.height; viewLine++ {
|
||||
@@ -622,10 +623,9 @@ func (v *View) DisplayView() {
|
||||
screenX = v.x
|
||||
|
||||
// This is the current line number of the buffer that we are drawing
|
||||
curLineN := viewLine + v.Topline
|
||||
curLineN = viewLine + v.Topline
|
||||
|
||||
if screenY >= v.height {
|
||||
v.Bottomline = curLineN
|
||||
break
|
||||
}
|
||||
|
||||
@@ -872,6 +872,10 @@ func (v *View) DisplayView() {
|
||||
}
|
||||
}
|
||||
}
|
||||
v.Bottomline = curLineN
|
||||
if !v.Buf.Settings["softwrap"].(bool) {
|
||||
v.Bottomline++
|
||||
}
|
||||
}
|
||||
|
||||
// DisplayCursor draws the current buffer's cursor to the screen
|
||||
|
||||
Reference in New Issue
Block a user