diff --git a/cmd/micro/actions.go b/cmd/micro/actions.go index ee1fa407..89e2a819 100644 --- a/cmd/micro/actions.go +++ b/cmd/micro/actions.go @@ -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 diff --git a/cmd/micro/buffer.go b/cmd/micro/buffer.go index b8071839..aeb50bc4 100644 --- a/cmd/micro/buffer.go +++ b/cmd/micro/buffer.go @@ -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 { diff --git a/cmd/micro/eventhandler.go b/cmd/micro/eventhandler.go index d50bdb0e..3ed08f0b 100644 --- a/cmd/micro/eventhandler.go +++ b/cmd/micro/eventhandler.go @@ -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) diff --git a/cmd/micro/lineArray.go b/cmd/micro/lineArray.go index 955ceec7..2ad4ea31 100644 --- a/cmd/micro/lineArray.go +++ b/cmd/micro/lineArray.go @@ -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 diff --git a/cmd/micro/messenger.go b/cmd/micro/messenger.go index 796f1e81..0056c61e 100644 --- a/cmd/micro/messenger.go +++ b/cmd/micro/messenger.go @@ -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 diff --git a/runtime/syntax/syntax_converter.go b/runtime/syntax/syntax_converter.go index eef38610..9dfe4bb8 100644 --- a/runtime/syntax/syntax_converter.go +++ b/runtime/syntax/syntax_converter.go @@ -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 { diff --git a/tools/semver/semver.go b/tools/semver/semver.go index 8ee0842e..ec26aa03 100644 --- a/tools/semver/semver.go +++ b/tools/semver/semver.go @@ -26,7 +26,7 @@ type Version struct { Minor uint64 Patch uint64 Pre []PRVersion - Build []string //No Precendence + Build []string //No Precedence } // Version to string