summaryrefslogtreecommitdiff
path: root/ted.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-07-21 17:02:25 -0400
committerpommicket <pommicket@gmail.com>2023-07-21 17:02:25 -0400
commite2d3a5d3c72206ffed7a8d252f2050fe0333c9bf (patch)
tree8fbc6077aa15f0bcfe8e377a3a295c200568d944 /ted.c
parentb303a87db03522795ec8697415b61750d5f8c565 (diff)
fix absolute font paths
Diffstat (limited to 'ted.c')
-rw-r--r--ted.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ted.c b/ted.c
index 6a44d83..2322987 100644
--- a/ted.c
+++ b/ted.c
@@ -272,6 +272,11 @@ static bool ted_is_regular_buffer(Ted *ted, TextBuffer *buffer) {
}
Status ted_get_file(Ted const *ted, const char *name, char *out, size_t outsz) {
+ if (path_is_absolute(name)) {
+ str_cpy(out, outsz, name);
+ if (fs_file_exists(out))
+ return true;
+ }
if (ted->search_start_cwd) {
// check in start_cwd
path_full(ted->start_cwd, name, out, outsz);