mirror of https://github.com/Hilbis/Hilbish
feat: change input mode
parent
f053bb2c8a
commit
2efc82736c
|
@ -22,3 +22,5 @@ bait.catch('hilbish.vimMode', function(mode)
|
|||
ansikit.cursorStyle(ansikit.lineCursor)
|
||||
end
|
||||
end)
|
||||
|
||||
hilbish.inputMode 'vim'
|
||||
|
|
4
api.go
4
api.go
|
@ -579,10 +579,10 @@ func hlinputMode(t *rt.Thread, c *rt.GoCont) (rt.Cont, error) {
|
|||
switch mode {
|
||||
case "emacs":
|
||||
unsetVimMode()
|
||||
lr.rl.Config.InputMode = readline.Emacs
|
||||
lr.rl.Config().InputMode = readline.Emacs
|
||||
case "vim":
|
||||
setVimMode("insert")
|
||||
lr.rl.Config.InputMode = readline.Vim
|
||||
lr.rl.Config().InputMode = readline.Vim
|
||||
default:
|
||||
return nil, errors.New("inputMode: expected vim or emacs, received " + mode)
|
||||
}
|
||||
|
|
2
go.mod
2
go.mod
|
@ -32,4 +32,4 @@ replace layeh.com/gopher-luar => github.com/layeh/gopher-luar v1.0.10
|
|||
|
||||
replace github.com/arnodel/golua => github.com/Rosettea/golua v0.0.0-20221213193027-cbf6d4e4d345
|
||||
|
||||
replace github.com/reeflective/readline => github.com/Rosettea/rl v0.0.0-20230109220413-32e3c6f4baaa
|
||||
replace github.com/reeflective/readline => github.com/Rosettea/rl v0.0.0-20230114144324-1e2af14177c3
|
||||
|
|
4
go.sum
4
go.sum
|
@ -8,6 +8,10 @@ github.com/Rosettea/golua v0.0.0-20221213193027-cbf6d4e4d345 h1:QNYjYDogUSiNUkff
|
|||
github.com/Rosettea/golua v0.0.0-20221213193027-cbf6d4e4d345/go.mod h1:9jzpYPiU2is0HVGCiuIOBSXdergHUW44IEjmuN1UrIE=
|
||||
github.com/Rosettea/rl v0.0.0-20230109220413-32e3c6f4baaa h1:48kPGi0HKC+iGwxwXLi6HeqeGj14zm5XYeyyD8VvFOo=
|
||||
github.com/Rosettea/rl v0.0.0-20230109220413-32e3c6f4baaa/go.mod h1:zSJq1ZyoiM0vGRBaF0uan1jbnoF+6M2hgZnQDtV3MX4=
|
||||
github.com/Rosettea/rl v0.0.0-20230114143626-6d535800e169 h1:jZKZxe6vBREgxrwdNMDPLBKVoQ369limZHwa5IebkK0=
|
||||
github.com/Rosettea/rl v0.0.0-20230114143626-6d535800e169/go.mod h1:zSJq1ZyoiM0vGRBaF0uan1jbnoF+6M2hgZnQDtV3MX4=
|
||||
github.com/Rosettea/rl v0.0.0-20230114144324-1e2af14177c3 h1:x3HhEGTYWM18OXn2oRlVGDCxm4noSgfIQYDfqV3E/4M=
|
||||
github.com/Rosettea/rl v0.0.0-20230114144324-1e2af14177c3/go.mod h1:zSJq1ZyoiM0vGRBaF0uan1jbnoF+6M2hgZnQDtV3MX4=
|
||||
github.com/Rosettea/sh/v3 v3.4.0-0.dev.0.20220306140409-795a84b00b4e h1:P2XupP8SaylWaudD1DqbWtZ3mIa8OsE9635LmR+Q+lg=
|
||||
github.com/Rosettea/sh/v3 v3.4.0-0.dev.0.20220306140409-795a84b00b4e/go.mod h1:R09vh/04ILvP2Gj8/Z9Jd0Dh0ZIvaucowMEs6abQpWs=
|
||||
github.com/Rosettea/sh/v3 v3.4.0-0.dev.0.20220524215627-dfd9a4fa219b h1:s5eDMhBk6H1BgipgLub/gv9qeyBaTuiHM0k3h2/9TSE=
|
||||
|
|
Loading…
Reference in New Issue