mirror of
https://github.com/zyedidia/micro.git
synced 2026-02-05 22:50:21 +09:00
@@ -65,6 +65,7 @@ type Cursor struct {
|
||||
// It's just a simple wrapper of FromCharPos
|
||||
func (c *Cursor) SetLoc(loc int) {
|
||||
c.x, c.y = FromCharPos(loc, c.v.buf)
|
||||
c.lastVisualX = c.GetVisualX()
|
||||
}
|
||||
|
||||
// Loc gets the cursor location in terms of character number instead
|
||||
|
||||
@@ -286,7 +286,8 @@ func (v *View) OpenFile() {
|
||||
messenger.Error(err.Error())
|
||||
return
|
||||
}
|
||||
v.buf = NewBuffer(string(file), filename)
|
||||
buf := NewBuffer(string(file), filename)
|
||||
v.OpenBuffer(buf)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user