feat: add restore_last_cursor_position config option (default true)
This commit is contained in:
parent
392cb2c764
commit
993add1a43
2 changed files with 6 additions and 1 deletions
|
@ -17,6 +17,7 @@ inline_diagnostics: bool = true,
|
|||
animation_min_lag: usize = 0, //milliseconds
|
||||
animation_max_lag: usize = 150, //milliseconds
|
||||
enable_format_on_save: bool = false,
|
||||
restore_last_cursor_position: bool = true,
|
||||
default_cursor: []const u8 = "default",
|
||||
|
||||
indent_size: usize = 4,
|
||||
|
|
|
@ -384,7 +384,11 @@ const cmds = struct {
|
|||
const same_file = if (self.get_active_file_path()) |fp| std.mem.eql(u8, fp, f) else false;
|
||||
const have_editor_metadata = if (self.buffer_manager.get_buffer_for_file(f)) |_| true else false;
|
||||
|
||||
if (!same_file and !have_editor_metadata and line == null) {
|
||||
if (tui.config().restore_last_cursor_position and
|
||||
!same_file and
|
||||
!have_editor_metadata and
|
||||
line == null)
|
||||
{
|
||||
const ctx_: struct {
|
||||
allocator: std.mem.Allocator,
|
||||
from: tp.pid,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue