Add support for moving to a specific line (#1196)

* Add support for moving to a specific line

* Update documentation
This commit is contained in:
Joe Lim authored and GitHub committed 2023-04-08 23:40:16 +03:00
1 parent 27d316c006
commit b5c83dbf7a
6 files changed
+36 -8

No files matched your search

+14 -2
View File
@@ -1425,7 +1425,13 @@ func (e *callExpr) eval(app *app, args []string) {
if !app.nav.init {
return
}
if app.nav.top() {
var moved bool
if e.count == 0 {
moved = app.nav.top()
} else {
moved = app.nav.move(e.count - 1)
}
if moved {
app.ui.loadFile(app, true)
app.ui.loadFileInfo(app.nav)
}
@@ -1433,7 +1439,13 @@ func (e *callExpr) eval(app *app, args []string) {
if !app.nav.init {
return
}
if app.nav.bottom() {
var moved bool
if e.count == 0 {
moved = app.nav.bottom()
} else {
moved = app.nav.move(e.count - 1)
}
if moved {
app.ui.loadFile(app, true)
app.ui.loadFileInfo(app.nav)
}