diff options
| author | Albert Cervin <albert@acervin.com> | 2023-05-11 22:09:49 +0200 |
|---|---|---|
| committer | Albert Cervin <albert@acervin.com> | 2023-05-11 22:09:49 +0200 |
| commit | ea849862a85e1751206c20254e9126cf3e8096b5 (patch) | |
| tree | 249bbd4630a156983ea77bc4d43c186e03f6ed0e /src/main | |
| parent | 67276833f9ede96dbc549c508f182c913240ac2c (diff) | |
| download | dged-ea849862a85e1751206c20254e9126cf3e8096b5.tar.gz dged-ea849862a85e1751206c20254e9126cf3e8096b5.tar.xz dged-ea849862a85e1751206c20254e9126cf3e8096b5.zip | |
Fix languages
- Enumerate windows on screen.
- Build with optimizations.
Diffstat (limited to 'src/main')
| -rw-r--r-- | src/main/cmds.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/main/cmds.c b/src/main/cmds.c index 48088b1..b7f7011 100644 --- a/src/main/cmds.c +++ b/src/main/cmds.c @@ -8,6 +8,7 @@ #include "dged/buffers.h" #include "dged/command.h" #include "dged/minibuffer.h" +#include "dged/path.h" #include "dged/settings.h" #include "bindings.h" @@ -48,15 +49,9 @@ int32_t find_file(struct command_ctx ctx, int argc, const char *argv[]) { return 1; } - const char *filename = realpath(pth, NULL); - if (filename == NULL) { - filename = pth; - } + const char *filename = to_abspath(pth); struct buffer *b = buffers_find_by_filename(ctx.buffers, filename); - - if (filename != pth) { - free((char *)filename); - } + free((char *)filename); if (b == NULL) { b = buffers_add(ctx.buffers, buffer_from_file((char *)pth)); |
