diff --git a/Makefile b/Makefile index 90d16c1..dbc378b 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ VERSION=0.2dev DEBUG?=false -all: kernel shell build micro hugo +all: kernel shell build micro dev: all go run ./dev diff --git a/external/micro/wanix_vendor.patch b/external/micro/wanix_vendor.patch index 68504e9..fcffa9e 100644 --- a/external/micro/wanix_vendor.patch +++ b/external/micro/wanix_vendor.patch @@ -160,3 +160,19 @@ index 3e6756bc..9f71377b 100644 } return } +diff --git a/internal/buffer/buffer.go b/internal/buffer/buffer.go +index dc4d037f..8e09ed32 100644 +--- a/internal/buffer/buffer.go ++++ b/internal/buffer/buffer.go +@@ -234,6 +234,11 @@ func NewBufferFromFileAtLoc(path string, btype BufType, cursorLoc Loc) (*Buffer, + return nil, err + } + ++ filename, err = filepath.Abs(filename) ++ if err != nil { ++ return nil, err ++ } ++ + f, err := os.OpenFile(filename, os.O_WRONLY, 0) + readonly := os.IsPermission(err) + f.Close()