summaryrefslogtreecommitdiff
path: root/src/main/main.c
diff options
context:
space:
mode:
authorAlbert Cervin <albert@acervin.com>2024-01-31 23:24:02 +0100
committerAlbert Cervin <albert@acervin.com>2024-01-31 23:24:02 +0100
commit4b6933a7cb5e0ef583071fffc0c97b829e72c684 (patch)
treecb608d7d3929fd1a32010b11be751fe2b741eeee /src/main/main.c
parentef64c4d05794484e5affbf633f095877cc1422df (diff)
downloaddged-4b6933a7cb5e0ef583071fffc0c97b829e72c684.tar.gz
dged-4b6933a7cb5e0ef583071fffc0c97b829e72c684.tar.xz
dged-4b6933a7cb5e0ef583071fffc0c97b829e72c684.zip
Fix syntax predicate creation
It is now created when parsing the queries. Also, make completion popup directly.
Diffstat (limited to 'src/main/main.c')
-rw-r--r--src/main/main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/main.c b/src/main/main.c
index 7b9a812..c40f438 100644
--- a/src/main/main.c
+++ b/src/main/main.c
@@ -229,8 +229,10 @@ int main(int argc, char *argv[]) {
struct buffer initial_buffer = buffer_create("welcome");
if (filename != NULL) {
buffer_destroy(&initial_buffer);
- initial_buffer = buffer_from_file(filename);
+ const char *absfile = to_abspath(filename);
+ initial_buffer = buffer_from_file(absfile);
free((void *)filename);
+ free((void *)absfile);
} else {
const char *welcome_txt = "Welcome to the editor for datagubbar 👴\n";
buffer_set_text(&initial_buffer, (uint8_t *)welcome_txt,