mirror of
https://github.com/zyedidia/micro.git
synced 2025-06-19 07:15:34 -04:00
Improve mouse selection performance
This commit is contained in:
parent
629f20720a
commit
bd0c172667
@ -88,7 +88,6 @@ func (h *BufPane) MousePress(e *tcell.EventMouse) bool {
|
|||||||
h.Cursor.AddWordToSelection()
|
h.Cursor.AddWordToSelection()
|
||||||
} else {
|
} else {
|
||||||
h.Cursor.SetSelectionEnd(h.Cursor.Loc)
|
h.Cursor.SetSelectionEnd(h.Cursor.Loc)
|
||||||
h.Cursor.CopySelection("primary")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,14 +16,12 @@ func GetMemStats() string {
|
|||||||
return fmt.Sprintf("Alloc: %s, Sys: %s, GC: %d, PauseTotalNs: %dns", humanize.Bytes(memstats.Alloc), humanize.Bytes(memstats.Sys), memstats.NumGC, memstats.PauseTotalNs)
|
return fmt.Sprintf("Alloc: %s, Sys: %s, GC: %d, PauseTotalNs: %dns", humanize.Bytes(memstats.Alloc), humanize.Bytes(memstats.Sys), memstats.NumGC, memstats.PauseTotalNs)
|
||||||
}
|
}
|
||||||
|
|
||||||
var start time.Time
|
func Tic(s string) time.Time {
|
||||||
|
|
||||||
func Tic(s string) {
|
|
||||||
log.Println("START:", s)
|
log.Println("START:", s)
|
||||||
start = time.Now()
|
return time.Now()
|
||||||
}
|
}
|
||||||
|
|
||||||
func Toc() {
|
func Toc(start time.Time) {
|
||||||
end := time.Now()
|
end := time.Now()
|
||||||
log.Println("END: ElapsedTime in seconds:", end.Sub(start))
|
log.Println("END: ElapsedTime in seconds:", end.Sub(start))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user