fix: don't truncate scratch buffer names in tabs and terminal title
This commit is contained in:
parent
aa9aa0ac93
commit
53ea08a41e
2 changed files with 8 additions and 1 deletions
|
@ -420,6 +420,8 @@ const Tab = struct {
|
|||
|
||||
fn name_from_buffer(buffer: *Buffer) []const u8 {
|
||||
const file_path = buffer.file_path;
|
||||
if (file_path.len > 0 and file_path[0] == '*')
|
||||
return file_path;
|
||||
const basename_begin = std.mem.lastIndexOfScalar(u8, file_path, std.fs.path.sep);
|
||||
const basename = if (basename_begin) |begin| file_path[begin + 1 ..] else file_path;
|
||||
return basename;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue