// 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()) {
// mouse release events
mouseReleased bool
- // Syntax higlighting matches
+ // Syntax highlighting matches
matches SyntaxMatches
// The matches from the last frame
lastMatches SyntaxMatches
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
screen.SetContent(x+tabchars, lineN, ' ', nil, selectStyle)
}
- x = 0
charNum++
}