]> git.lizzy.rs Git - micro.git/commitdiff
Slight cleanup
authorZachary Yedidia <zyedidia@gmail.com>
Fri, 25 Mar 2016 18:56:29 +0000 (14:56 -0400)
committerZachary Yedidia <zyedidia@gmail.com>
Fri, 25 Mar 2016 18:56:29 +0000 (14:56 -0400)
src/micro.go
src/view.go

index 581316255e325c0fcc9c2c30ea27d902820fb635..5e915bc031a22d36477b29c1a34aeb6ba8402f43 100644 (file)
@@ -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()) {
index c59132bbbc738ab505b08fb6b2a875b1fce01e7f..1070459555b7d08be8f6e8cd1c32e83b33fd23cd 100644 (file)
@@ -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++
        }