Compare commits

..

No commits in common. "8fb360259471f9b575af320c340b8b9463976764" and "0a4c1a57b128967ae39b69a582c1ca30c39f7499" have entirely different histories.

2 changed files with 2 additions and 5 deletions

View file

@ -19,7 +19,6 @@ animation_min_lag: usize = 0, //milliseconds
animation_max_lag: usize = 150, //milliseconds
enable_format_on_save: bool = false,
restore_last_cursor_position: bool = true,
follow_cursor_on_buffer_switch: bool = false, //scroll cursor into view on buffer switch
default_cursor: []const u8 = "default",
indent_size: usize = 4,

View file

@ -433,8 +433,7 @@ pub const Editor = struct {
return error.RestoreFindHistory;
self.push_find_history(value);
}
if (tui.config().follow_cursor_on_buffer_switch)
self.clamp();
self.clamp();
}
fn init(self: *Self, allocator: Allocator, n: Plane, buffer_manager: *Buffer.Manager) void {
@ -4716,8 +4715,7 @@ pub const Editor = struct {
var file_path: []const u8 = undefined;
if (ctx.args.match(.{tp.extract(&file_path)}) catch false) {
try self.open(file_path);
if (tui.config().follow_cursor_on_buffer_switch)
self.clamp();
self.clamp();
} else return error.InvalidOpenBufferFromFileArgument;
}
pub const open_buffer_from_file_meta: Meta = .{ .arguments = &.{.string} };