Autoformatting

This commit is contained in:
Zachary Yedidia
2020-08-12 16:03:14 -04:00
parent 08f772b7d0
commit c1621086a2
7 changed files with 96 additions and 10 deletions

View File

@@ -2,6 +2,7 @@ package buffer
import (
"github.com/zyedidia/micro/v2/internal/util"
"go.lsp.dev/protocol"
)
// Loc stores a location
@@ -146,3 +147,10 @@ func clamp(pos Loc, la *LineArray) Loc {
}
return pos
}
func toLoc(r protocol.Position) Loc {
return Loc{
X: int(r.Character),
Y: int(r.Line),
}
}