Compare commits

..

3 Commits

Author SHA1 Message Date
42e1700e7a
editor: Remove insert mode and use the arrow keys to navigate, plus Ctrl+S to save
All checks were successful
Build and test / build (push) Successful in 1m47s
2024-03-06 22:41:21 +01:00
f0ce6c36de
editor: Add basic loading and saving
All checks were successful
Build and test / build (push) Successful in 1m54s
2024-03-06 22:22:47 +01:00
2951c539b1
editor: Add a basic text editor 2024-03-06 22:22:44 +01:00
2 changed files with 13 additions and 3 deletions

View File

@ -166,7 +166,12 @@ static Result<void> combine_forward(HeapBlock* block)
if (next->status & BLOCK_END_MEM)
{
if (next->status & BLOCK_START_MEM) { unreachable(); }
if (next->status & BLOCK_START_MEM)
{
const usize pages = ceil_div(next->full_size + sizeof(HeapBlock), PAGE_SIZE);
TRY(release_pages_impl(next, pages));
return {};
}
else
block->status |= BLOCK_END_MEM;
}
@ -190,7 +195,12 @@ static Result<HeapBlock*> combine_backward(HeapBlock* block)
if (block->status & BLOCK_END_MEM)
{
if (block->status & BLOCK_START_MEM) { unreachable(); }
if (block->status & BLOCK_START_MEM)
{
const usize pages = ceil_div(block->full_size + sizeof(HeapBlock), PAGE_SIZE);
TRY(release_pages_impl(block, pages));
return last;
}
else
last->status |= BLOCK_END_MEM;
}

View File

@ -17,7 +17,7 @@ do_patch()
do_configure()
{
$srcdir/configure --prefix=/usr --target=$LUNA_ARCH-luna --host=$LUNA_ARCH-luna --disable-nls --with-build-sysroot=$LUNA_BASE --enable-languages=c,c++ --enable-initfini-array
$srcdir/configure --prefix=/usr --target=$LUNA_ARCH-luna --host=$LUNA_ARCH-luna --disable-nls --with-build-sysroot=$LUNA_BASE --enable-languages=c,c++ --enable-checking --enable-initfini-array
}
do_build()