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