mirror of
https://github.com/anomalyco/opencode.git
synced 2026-04-30 13:39:52 +00:00
small improvements
This commit is contained in:
parent
caea293759
commit
c24e3c18e0
11 changed files with 149 additions and 37 deletions
|
|
@ -118,12 +118,14 @@ func (m *editorCmp) GetSize() (int, int) {
|
|||
}
|
||||
|
||||
func (m *editorCmp) BindingKeys() []key.Binding {
|
||||
bindings := layout.KeyMapToSlice(m.textarea.KeyMap)
|
||||
bindings := []key.Binding{}
|
||||
if m.textarea.Focused() {
|
||||
bindings = append(bindings, layout.KeyMapToSlice(focusedKeyMaps)...)
|
||||
} else {
|
||||
bindings = append(bindings, layout.KeyMapToSlice(bluredKeyMaps)...)
|
||||
}
|
||||
|
||||
bindings = append(bindings, layout.KeyMapToSlice(m.textarea.KeyMap)...)
|
||||
return bindings
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue