mirror of
https://github.com/zyedidia/micro
synced 2024-11-05 17:41:24 +00:00
Rebind escape to clear info and deselect
This commit is contained in:
parent
b793e9bb92
commit
32c8517a90
4 changed files with 16 additions and 2 deletions
|
@ -1443,6 +1443,18 @@ func (h *BufPane) Escape() bool {
|
|||
return true
|
||||
}
|
||||
|
||||
// Deselect deselects on the current cursor
|
||||
func (h *BufPane) Deselect() bool {
|
||||
h.Cursor.Deselect(true)
|
||||
return true
|
||||
}
|
||||
|
||||
// ClearInfo clears the infobar
|
||||
func (h *BufPane) ClearInfo() bool {
|
||||
InfoBar.Message("")
|
||||
return true
|
||||
}
|
||||
|
||||
// Quit this will close the current tab or view that is open
|
||||
func (h *BufPane) Quit() bool {
|
||||
quit := func() {
|
||||
|
|
|
@ -635,6 +635,8 @@ var BufKeyActions = map[string]BufKeyAction{
|
|||
"SkipMultiCursor": (*BufPane).SkipMultiCursor,
|
||||
"JumpToMatchingBrace": (*BufPane).JumpToMatchingBrace,
|
||||
"JumpLine": (*BufPane).JumpLine,
|
||||
"Deselect": (*BufPane).Deselect,
|
||||
"ClearInfo": (*BufPane).ClearInfo,
|
||||
"None": (*BufPane).None,
|
||||
|
||||
// This was changed to InsertNewline but I don't want to break backwards compatibility
|
||||
|
|
|
@ -88,7 +88,7 @@ func DefaultBindings() map[string]string {
|
|||
"F4": "Quit",
|
||||
"F7": "Find",
|
||||
"F10": "Quit",
|
||||
"Esc": "Escape",
|
||||
"Esc": "Deselect,ClearInfo,RemoveAllMultiCursors",
|
||||
|
||||
// Mouse bindings
|
||||
"MouseWheelUp": "ScrollUp",
|
||||
|
|
|
@ -90,7 +90,7 @@ func DefaultBindings() map[string]string {
|
|||
"F4": "Quit",
|
||||
"F7": "Find",
|
||||
"F10": "Quit",
|
||||
"Esc": "Escape",
|
||||
"Esc": "Deselect,ClearInfo,RemoveAllMultiCursors",
|
||||
|
||||
// Mouse bindings
|
||||
"MouseWheelUp": "ScrollUp",
|
||||
|
|
Loading…
Reference in a new issue