From 1350deae5695adc8aba46556fb2c79bfbc14e3ba Mon Sep 17 00:00:00 2001 From: Zachary Yedidia Date: Sun, 26 Mar 2017 18:01:02 -0400 Subject: [PATCH] Fix small softwrap bug --- cmd/micro/view.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/micro/view.go b/cmd/micro/view.go index 52f975ca..e5e2bba4 100644 --- a/cmd/micro/view.go +++ b/cmd/micro/view.go @@ -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() } }