mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-29 14:22:42 +09:00
Improve remove performance
This commit is contained in:
@@ -139,7 +139,7 @@ func ByteOffset(pos Loc, buf *Buffer) int {
|
||||
// clamps a loc within a buffer
|
||||
func clamp(pos Loc, la *LineArray) Loc {
|
||||
if pos.GreaterEqual(la.End()) {
|
||||
return la.End().MoveLA(-1, la)
|
||||
return la.End()
|
||||
} else if pos.LessThan(la.Start()) {
|
||||
return la.Start()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user