fix: handle absolute file paths in open file prompt
This commit is contained in:
parent
eae28536d2
commit
e39a118c70
2 changed files with 16 additions and 5 deletions
|
|
@ -1040,6 +1040,8 @@ pub fn abbreviate_home(buf: []u8, path: []const u8) []const u8 {
|
|||
return "~";
|
||||
} else if (homerelpath.len > 3 and std.mem.eql(u8, homerelpath[0..3], "../")) {
|
||||
return path;
|
||||
} else if (homerelpath.len + 2 > buf.len) {
|
||||
return path;
|
||||
} else {
|
||||
buf[0] = '~';
|
||||
buf[1] = '/';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue