From 5e993b892b58434f879e27da0655df52ae8d7058 Mon Sep 17 00:00:00 2001 From: Zachary Yedidia Date: Fri, 25 Mar 2016 14:56:29 -0400 Subject: [PATCH] Slight cleanup --- src/micro.go | 2 +- src/view.go | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/micro.go b/src/micro.go index 58131625..5e915bc0 100644 --- a/src/micro.go +++ b/src/micro.go @@ -40,7 +40,7 @@ func LoadInput() (string, []byte, error) { // Option 1 filename = os.Args[1] // Check that the file exists - if _, err := os.Stat(filename); err == nil { + if _, e := os.Stat(filename); e == nil { input, err = ioutil.ReadFile(filename) } } else if !isatty.IsTerminal(os.Stdin.Fd()) { diff --git a/src/view.go b/src/view.go index c59132bb..10704595 100644 --- a/src/view.go +++ b/src/view.go @@ -44,7 +44,7 @@ type View struct { // mouse release events mouseReleased bool - // Syntax higlighting matches + // Syntax highlighting matches matches SyntaxMatches // The matches from the last frame lastMatches SyntaxMatches @@ -460,7 +460,7 @@ func (v *View) HandleEvent(event tcell.Event) { v.mouseReleased = true } // We don't want to relocate because otherwise the view will be relocated - // everytime the user moves the cursor + // every time the user moves the cursor relocate = false case tcell.WheelUp: // Scroll up two lines @@ -581,7 +581,6 @@ func (v *View) DisplayView() { screen.SetContent(x+tabchars, lineN, ' ', nil, selectStyle) } - x = 0 charNum++ }