handle command properly with 'cmd-word'back'

This commit is contained in:
Gokcehan 2018-06-16 00:13:33 +03:00
parent 76a725eaf2
commit 52974615f2

View File

@ -670,7 +670,9 @@ func (e *callExpr) eval(app *app, args []string) {
return return
} }
ind := locs[len(locs)-1][1] - 1 ind := locs[len(locs)-1][1] - 1
app.ui.cmdAccRight = append(app.ui.cmdAccLeft[ind:], app.ui.cmdAccRight...) old := app.ui.cmdAccRight
app.ui.cmdAccRight = append([]rune{}, app.ui.cmdAccLeft[ind:]...)
app.ui.cmdAccRight = append(app.ui.cmdAccRight, old...)
app.ui.cmdAccLeft = app.ui.cmdAccLeft[:ind] app.ui.cmdAccLeft = app.ui.cmdAccLeft[:ind]
case "cmd-capitalize-word": case "cmd-capitalize-word":
if len(app.ui.cmdAccRight) == 0 { if len(app.ui.cmdAccRight) == 0 {