diff --git a/src/main.c b/src/main.c index c7e70e9f..81295e32 100644 --- a/src/main.c +++ b/src/main.c @@ -9,7 +9,7 @@ static bool init = false; static void repl_init() { if (init) return; cbqn_init(); - replPath = emptyCVec(); gc_add(replPath); + replPath = m_str32(U"."); gc_add(replPath); Block* initBlock = bqn_comp(m_str32(U"\"(REPL initializer)\""), inc(replPath), m_f64(0)); gsc = m_scope(initBlock->body, NULL, 0, 0, NULL); gc_add(tag(gsc,OBJ_TAG)); ptr_dec(initBlock); diff --git a/src/vm.c b/src/vm.c index 7c04f3f5..7f729957 100644 --- a/src/vm.c +++ b/src/vm.c @@ -845,7 +845,7 @@ NOINLINE B vm_fmtPoint(B src, B prepend, B path, usz cs, usz ce) { // consumes p i64 ln = 1; for (usz i = 0; i < srcS; i++) if(o2cu(srcGetU(src, i))=='\n') ln++; B s = prepend; - if (isArr(path) && a(path)->ia>0) AFMT("%R:%l:\n ", path, ln); + if (isArr(path) && (a(path)->ia>1 || (a(path)->ia==1 && TI(path,getU)(path,0).u!=m_c32('.').u))) AFMT("%R:%l:\n ", path, ln); else AFMT("at "); i64 padEnd = (i64)a(s)->ia; i64 padStart = padEnd;