From 5c2a2b1b7edeb763f148c8d82cc77b3ab1cbb83a Mon Sep 17 00:00:00 2001 From: Zachary Yedidia Date: Wed, 12 Oct 2016 22:05:24 -0400 Subject: [PATCH] Fix problem with horizontal scrolling --- cmd/micro/view.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/micro/view.go b/cmd/micro/view.go index a7627354..7bcddef9 100644 --- a/cmd/micro/view.go +++ b/cmd/micro/view.go @@ -734,7 +734,7 @@ func (v *View) DisplayView() { } if tabs[curTab].curView == v.Num && !v.Cursor.HasSelection() && v.Cursor.Y == curLineN && colN == v.Cursor.X { - v.DisplayCursor(screenX, screenY) + v.DisplayCursor(screenX-v.leftCol, screenY) } lineStyle := defStyle @@ -828,7 +828,7 @@ func (v *View) DisplayView() { // Here we are at a newline if tabs[curTab].curView == v.Num && !v.Cursor.HasSelection() && v.Cursor.Y == curLineN && colN == v.Cursor.X { - v.DisplayCursor(screenX, screenY) + v.DisplayCursor(screenX-v.leftCol, screenY) } // The newline may be selected, in which case we should draw the selection style