fix(vaxis): report zero length for cells containing spaces in at_cursor_cell
This fixes diagnostics messages not displaying
This commit is contained in:
		
							parent
							
								
									c1b6817493
								
							
						
					
					
						commit
						f1fa8fe883
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -238,7 +238,7 @@ pub fn cell_load(self: *Plane, cell: *Cell, gcluster: [:0]const u8) !usize {
 | 
			
		|||
pub fn at_cursor_cell(self: Plane, cell: *Cell) !usize {
 | 
			
		||||
    cell.* = .{};
 | 
			
		||||
    if (self.window.readCell(@intCast(self.col), @intCast(self.row))) |cell_| cell.cell = cell_;
 | 
			
		||||
    return cell.cell.char.grapheme.len;
 | 
			
		||||
    return if (std.mem.eql(u8, cell.cell.char.grapheme, " ")) 0 else cell.cell.char.grapheme.len;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
pub fn set_styles(self: *Plane, stylebits: StyleBits) void {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue