Add support for moving to a specific line (#1196)
* Add support for moving to a specific line * Update documentation
This commit is contained in:
1 parent
27d316c006
commit
b5c83dbf7a
6 files changed
+36
-8
No files matched your search
@@ -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)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user