Fix small softwrap bug

This commit is contained in:
Zachary Yedidia 2017-03-26 18:01:02 -04:00
parent df564e1b8b
commit 1350deae56

View File

@ -596,6 +596,12 @@ func (v *View) HandleEvent(event tcell.Event) {
if relocate {
v.Relocate()
// We run relocate again because there's a bug with relocating with softwrap
// when for example you jump to the bottom of the buffer and it tries to
// calculate where to put the topline so that the bottom line is at the bottom
// of the terminal and it runs into problems with visual lines vs real lines.
// This is (hopefully) a temporary solution
v.Relocate()
}
}