Add more option support

This commit is contained in:
Zachary Yedidia
2019-01-24 18:25:59 -05:00
parent 0e4faf108d
commit ef18fc572c
4 changed files with 23 additions and 20 deletions

View File

@@ -587,7 +587,7 @@ func (h *BufPane) ReplaceCmd(args []string) {
}
if !found || !inRange(locs[0]) || !inRange(locs[1]) {
h.Cursor.ResetSelection()
h.Cursor.Relocate()
h.Buf.RelocateCursors()
return
}
@@ -606,7 +606,7 @@ func (h *BufPane) ReplaceCmd(args []string) {
searchLoc.X += utf8.RuneCount(replace)
} else if canceled {
h.Cursor.ResetSelection()
h.Cursor.Relocate()
h.Buf.RelocateCursors()
return
}
if searching {
@@ -617,8 +617,7 @@ func (h *BufPane) ReplaceCmd(args []string) {
doReplacement()
}
// TODO: relocate all cursors?
h.Cursor.Relocate()
h.Buf.RelocateCursors()
if nreplaced > 1 {
InfoBar.Message("Replaced ", nreplaced, " occurrences of ", search)