Infobar history

This commit is contained in:
Zachary Yedidia
2019-01-03 17:07:28 -05:00
parent 6fdf275b8a
commit e29cae4f7f
6 changed files with 100 additions and 63 deletions

View File

@@ -560,7 +560,7 @@ func (h *BufHandler) SaveAs() bool {
// Find opens a prompt and searches forward for the input
func (h *BufHandler) Find() bool {
InfoBar.Prompt("Find: ", "", func(resp string) {
InfoBar.Prompt("Find: ", "", "Find", func(resp string) {
// Event callback
match, found, _ := h.Buf.FindNext(resp, h.Cursor.Loc, true)
if found {
@@ -802,7 +802,7 @@ func (h *BufHandler) SelectAll() bool {
// OpenFile opens a new file in the buffer
func (h *BufHandler) OpenFile() bool {
InfoBar.Prompt("> ", "open ", nil, func(resp string, canceled bool) {
InfoBar.Prompt("> ", "open ", "Open", nil, func(resp string, canceled bool) {
if !canceled {
HandleCommand(resp)
}
@@ -966,7 +966,7 @@ func (h *BufHandler) ShellMode() bool {
// CommandMode lets the user enter a command
func (h *BufHandler) CommandMode() bool {
InfoBar.Prompt("> ", "", nil, func(resp string, canceled bool) {
InfoBar.Prompt("> ", "", "Command", nil, func(resp string, canceled bool) {
if !canceled {
HandleCommand(resp)
}