Fix some lint problems

This commit is contained in:
Zachary Yedidia 2017-08-08 11:30:09 -04:00
parent dd5afc0560
commit 69c6d8a099
7 changed files with 6 additions and 9 deletions

View file

@ -1903,7 +1903,7 @@ func (v *View) PlayMacro(usePlugin bool) bool {
return true
}
// SpawnMultiCursor creates a new multiple cursor at the next occurence of the current selection or current word
// SpawnMultiCursor creates a new multiple cursor at the next occurrence of the current selection or current word
func (v *View) SpawnMultiCursor(usePlugin bool) bool {
spawner := v.Buf.cursors[len(v.Buf.cursors)-1]
// You can only spawn a cursor from the main cursor

View file

@ -240,7 +240,6 @@ func (b *Buffer) UpdateRules() {
if b.syntaxDef != nil {
highlight.ResolveIncludes(b.syntaxDef, files)
}
files = nil
if b.highlighter == nil || rehighlight {
if b.syntaxDef != nil {

View file

@ -99,7 +99,7 @@ func (eh *EventHandler) Insert(start Loc, text string) {
e := &TextEvent{
C: *eh.buf.cursors[eh.buf.curCursor],
EventType: TextEventInsert,
Deltas: []Delta{Delta{text, start, Loc{0, 0}}},
Deltas: []Delta{{text, start, Loc{0, 0}}},
Time: time.Now(),
}
eh.Execute(e)
@ -129,7 +129,7 @@ func (eh *EventHandler) Remove(start, end Loc) {
e := &TextEvent{
C: *eh.buf.cursors[eh.buf.curCursor],
EventType: TextEventRemove,
Deltas: []Delta{Delta{"", start, end}},
Deltas: []Delta{{"", start, end}},
Time: time.Now(),
}
eh.Execute(e)

View file

@ -87,7 +87,7 @@ func NewLineArray(size int64, reader io.Reader) *LineArray {
if err != nil {
if err == io.EOF {
la.lines = Append(la.lines, Line{data[:len(data)], nil, nil, false})
la.lines = Append(la.lines, Line{data[:], nil, nil, false})
// la.lines = Append(la.lines, Line{data[:len(data)]})
}
// Last line was read

View file

@ -7,9 +7,9 @@ import (
"os"
"strconv"
"github.com/mattn/go-runewidth"
"github.com/zyedidia/clipboard"
"github.com/zyedidia/tcell"
"github.com/mattn/go-runewidth"
)
// TermMessage sends a message to the user in the terminal. This usually occurs before

View file

@ -105,11 +105,9 @@ func parseFile(text, filename string) (filetype, syntax, header string, rules []
var start string
var end string
// Use m and s flags by default
flags := "ms"
if len(submatch) == 5 {
// If len is 5 the user provided some additional flags
color = string(submatch[1])
flags += string(submatch[2])
start = string(submatch[3])
end = string(submatch[4])
} else if len(submatch) == 4 {

View file

@ -26,7 +26,7 @@ type Version struct {
Minor uint64
Patch uint64
Pre []PRVersion
Build []string //No Precendence
Build []string //No Precedence
}
// Version to string