fix •file in REPL

This commit is contained in:
dzaima 2021-07-12 12:09:45 +03:00
parent cdc363c94f
commit c192125a9c
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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;