mirror of
https://github.com/Kyren223/eko.git
synced 2026-07-11 23:09:32 +00:00
viminput can now be exited with ctrl+q in insert mode
This commit is contained in:
@@ -136,8 +136,9 @@ func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) {
|
||||
|
||||
if m.locked {
|
||||
if key, ok := msg.(tea.KeyMsg); ok {
|
||||
InNormal := m.vi.Mode() == viminput.NormalMode
|
||||
if key.String() == "q" && InNormal {
|
||||
inNormalQ := key.String() == "q" && m.vi.Mode() == viminput.NormalMode
|
||||
inInsertCtrlQ := key.String() == "ctrl+q" && m.vi.Mode() == viminput.InsertMode
|
||||
if inNormalQ || inInsertCtrlQ {
|
||||
m.locked = false
|
||||
m.Prerender()
|
||||
return m, nil
|
||||
|
||||
@@ -631,6 +631,7 @@ func (m *Model) handleInsertModeKeys(key tea.KeyMsg) {
|
||||
Paste: false,
|
||||
})
|
||||
m.Yank(paste)
|
||||
return
|
||||
}
|
||||
|
||||
if key.Type == tea.KeyTab || key.Type == tea.KeyShiftTab {
|
||||
|
||||
Reference in New Issue
Block a user