Change default mode to 'dir'

This commit is contained in:
Diogo Duarte
2025-02-26 10:23:59 +00:00
parent d897f6b0bd
commit 7a2f62fbb3
2 changed files with 8 additions and 7 deletions

View File

@@ -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`

View File

@@ -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