reset 'cmd-hist-next/prev' to last in normal mode
This commit is contained in:
1 parent
e55c490bf5
commit
f6c99a7d46
1 file changed
+6
@@ -490,6 +490,9 @@ func (e *callExpr) eval(app *app, args []string) {
|
||||
app.cmdHist = append(app.cmdHist, cmdItem{app.ui.cmdPrefix, s})
|
||||
app.ui.cmdPrefix = ""
|
||||
case "cmd-hist-next":
|
||||
if app.ui.cmdPrefix == "" {
|
||||
return
|
||||
}
|
||||
if app.cmdHistInd > 0 {
|
||||
app.cmdHistInd--
|
||||
}
|
||||
@@ -506,6 +509,9 @@ func (e *callExpr) eval(app *app, args []string) {
|
||||
app.ui.cmdAccRight = nil
|
||||
app.ui.menuBuf = nil
|
||||
case "cmd-hist-prev":
|
||||
if app.ui.cmdPrefix == "" {
|
||||
app.cmdHistInd = 0
|
||||
}
|
||||
if app.cmdHistInd == len(app.cmdHist) {
|
||||
return
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user