mirror of
https://github.com/zyedidia/micro.git
synced 2025-06-18 14:55:38 -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()
|
||||
} else {
|
||||
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)
|
||||
}
|
||||
|
||||
var start time.Time
|
||||
|
||||
func Tic(s string) {
|
||||
func Tic(s string) time.Time {
|
||||
log.Println("START:", s)
|
||||
start = time.Now()
|
||||
return time.Now()
|
||||
}
|
||||
|
||||
func Toc() {
|
||||
func Toc(start time.Time) {
|
||||
end := time.Now()
|
||||
log.Println("END: ElapsedTime in seconds:", end.Sub(start))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user