Change default mode to 'dir'
This commit is contained in:
10
README.md
10
README.md
@@ -88,11 +88,11 @@ There's also the option to enable persistence to this automatic bookmark.
|
|||||||
|
|
||||||
Finally, there's a `mode` option with the following options:
|
Finally, there's a `mode` option with the following options:
|
||||||
|
|
||||||
| Value | Description |
|
| Value | Description |
|
||||||
| ------ | --------------------------------------------------- |
|
| ------ | ------------------------------------------------------------ |
|
||||||
| `jump` | Default, It saves the last used mark |
|
| `jump` | It saves the position before the last used mark |
|
||||||
| `mark` | It saves the last created mark |
|
| `mark` | It saves the last created mark |
|
||||||
| `dir` | It saves the last visited directory (old behaviour) |
|
| `dir` | Default, it saves the last visited directory (old behaviour) |
|
||||||
|
|
||||||
### `persist`
|
### `persist`
|
||||||
|
|
||||||
|
|||||||
5
main.lua
5
main.lua
@@ -313,14 +313,15 @@ return {
|
|||||||
elseif args.last_directory.mode == "jump" then
|
elseif args.last_directory.mode == "jump" then
|
||||||
state.last_persist = args.last_directory.persist
|
state.last_persist = args.last_directory.persist
|
||||||
state.last_mode = "jump"
|
state.last_mode = "jump"
|
||||||
elseif args.last_directory.mode == "jump" then
|
elseif args.last_directory.mode == "dir" then
|
||||||
state.last_persist = args.last_directory.persist
|
state.last_persist = args.last_directory.persist
|
||||||
state.last_mode = "dir"
|
state.last_mode = "dir"
|
||||||
save_last_dir()
|
save_last_dir()
|
||||||
else
|
else
|
||||||
-- default
|
-- default
|
||||||
state.last_persist = args.last_directory.persist
|
state.last_persist = args.last_directory.persist
|
||||||
state.last_mode = "jump"
|
state.last_mode = "dir"
|
||||||
|
save_last_dir()
|
||||||
end
|
end
|
||||||
|
|
||||||
if args.last_directory.persist then
|
if args.last_directory.persist then
|
||||||
|
|||||||
Reference in New Issue
Block a user