mirror of
https://github.com/zyedidia/micro.git
synced 2025-06-18 23:05:40 -04:00
Fix some lint problems
This commit is contained in:
parent
dd5afc0560
commit
69c6d8a099
@ -1903,7 +1903,7 @@ func (v *View) PlayMacro(usePlugin bool) bool {
|
|||||||
return true
|
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 {
|
func (v *View) SpawnMultiCursor(usePlugin bool) bool {
|
||||||
spawner := v.Buf.cursors[len(v.Buf.cursors)-1]
|
spawner := v.Buf.cursors[len(v.Buf.cursors)-1]
|
||||||
// You can only spawn a cursor from the main cursor
|
// You can only spawn a cursor from the main cursor
|
||||||
|
@ -240,7 +240,6 @@ func (b *Buffer) UpdateRules() {
|
|||||||
if b.syntaxDef != nil {
|
if b.syntaxDef != nil {
|
||||||
highlight.ResolveIncludes(b.syntaxDef, files)
|
highlight.ResolveIncludes(b.syntaxDef, files)
|
||||||
}
|
}
|
||||||
files = nil
|
|
||||||
|
|
||||||
if b.highlighter == nil || rehighlight {
|
if b.highlighter == nil || rehighlight {
|
||||||
if b.syntaxDef != nil {
|
if b.syntaxDef != nil {
|
||||||
|
@ -99,7 +99,7 @@ func (eh *EventHandler) Insert(start Loc, text string) {
|
|||||||
e := &TextEvent{
|
e := &TextEvent{
|
||||||
C: *eh.buf.cursors[eh.buf.curCursor],
|
C: *eh.buf.cursors[eh.buf.curCursor],
|
||||||
EventType: TextEventInsert,
|
EventType: TextEventInsert,
|
||||||
Deltas: []Delta{Delta{text, start, Loc{0, 0}}},
|
Deltas: []Delta{{text, start, Loc{0, 0}}},
|
||||||
Time: time.Now(),
|
Time: time.Now(),
|
||||||
}
|
}
|
||||||
eh.Execute(e)
|
eh.Execute(e)
|
||||||
@ -129,7 +129,7 @@ func (eh *EventHandler) Remove(start, end Loc) {
|
|||||||
e := &TextEvent{
|
e := &TextEvent{
|
||||||
C: *eh.buf.cursors[eh.buf.curCursor],
|
C: *eh.buf.cursors[eh.buf.curCursor],
|
||||||
EventType: TextEventRemove,
|
EventType: TextEventRemove,
|
||||||
Deltas: []Delta{Delta{"", start, end}},
|
Deltas: []Delta{{"", start, end}},
|
||||||
Time: time.Now(),
|
Time: time.Now(),
|
||||||
}
|
}
|
||||||
eh.Execute(e)
|
eh.Execute(e)
|
||||||
|
@ -87,7 +87,7 @@ func NewLineArray(size int64, reader io.Reader) *LineArray {
|
|||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if err == io.EOF {
|
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)]})
|
// la.lines = Append(la.lines, Line{data[:len(data)]})
|
||||||
}
|
}
|
||||||
// Last line was read
|
// Last line was read
|
||||||
|
@ -7,9 +7,9 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
|
"github.com/mattn/go-runewidth"
|
||||||
"github.com/zyedidia/clipboard"
|
"github.com/zyedidia/clipboard"
|
||||||
"github.com/zyedidia/tcell"
|
"github.com/zyedidia/tcell"
|
||||||
"github.com/mattn/go-runewidth"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// TermMessage sends a message to the user in the terminal. This usually occurs before
|
// TermMessage sends a message to the user in the terminal. This usually occurs before
|
||||||
|
@ -105,11 +105,9 @@ func parseFile(text, filename string) (filetype, syntax, header string, rules []
|
|||||||
var start string
|
var start string
|
||||||
var end string
|
var end string
|
||||||
// Use m and s flags by default
|
// Use m and s flags by default
|
||||||
flags := "ms"
|
|
||||||
if len(submatch) == 5 {
|
if len(submatch) == 5 {
|
||||||
// If len is 5 the user provided some additional flags
|
// If len is 5 the user provided some additional flags
|
||||||
color = string(submatch[1])
|
color = string(submatch[1])
|
||||||
flags += string(submatch[2])
|
|
||||||
start = string(submatch[3])
|
start = string(submatch[3])
|
||||||
end = string(submatch[4])
|
end = string(submatch[4])
|
||||||
} else if len(submatch) == 4 {
|
} else if len(submatch) == 4 {
|
||||||
|
@ -26,7 +26,7 @@ type Version struct {
|
|||||||
Minor uint64
|
Minor uint64
|
||||||
Patch uint64
|
Patch uint64
|
||||||
Pre []PRVersion
|
Pre []PRVersion
|
||||||
Build []string //No Precendence
|
Build []string //No Precedence
|
||||||
}
|
}
|
||||||
|
|
||||||
// Version to string
|
// Version to string
|
||||||
|
Loading…
Reference in New Issue
Block a user