mirror of
https://github.com/zyedidia/micro.git
synced 2025-06-19 07:15:34 -04:00
Adding SpawnCursorAtLoc for plugin to use (#3441)
This commit is contained in:
parent
968f5ba1ef
commit
e6b20b2ce9
@ -1955,6 +1955,14 @@ func (h *BufPane) SpawnMultiCursor() bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SpawnCursorAtLoc spawns a new cursor at a location and merges the cursors
|
||||||
|
func (h *BufPane) SpawnCursorAtLoc(loc buffer.Loc) *buffer.Cursor {
|
||||||
|
c := buffer.NewCursor(h.Buf, loc)
|
||||||
|
h.Buf.AddCursor(c)
|
||||||
|
h.Buf.MergeCursors()
|
||||||
|
return c
|
||||||
|
}
|
||||||
|
|
||||||
// SpawnMultiCursorUpN is not an action
|
// SpawnMultiCursorUpN is not an action
|
||||||
func (h *BufPane) SpawnMultiCursorUpN(n int) bool {
|
func (h *BufPane) SpawnMultiCursorUpN(n int) bool {
|
||||||
lastC := h.Buf.GetCursor(h.Buf.NumCursors() - 1)
|
lastC := h.Buf.GetCursor(h.Buf.NumCursors() - 1)
|
||||||
|
Loading…
Reference in New Issue
Block a user