Fixing addressing

- Fix double resolve bug in address handler
- Fix multiple major issues with next_closing and prev_opening functions.
- add `=` ed command.
- Other minor fixes.
This commit is contained in:
2026-08-21 20:35:20 +01:00
parent 3e3fb6c39d
commit 556bb631f6
5 changed files with 73 additions and 52 deletions
+15
View File
@@ -101,6 +101,21 @@ void Command::register_posix(BEd &ctx) {
}
}
);
ctx.commands.insert(
"=",
Command{
.address_mode = Command::AddressMode::Single,
.suffix = Command::SuffixKind::Suffix,
.desc = "Print line number",
.accept_zero = false,
.handle = [](BEd &ctx, std::span<const uint64_t> addresses, std::string_view) {
if (!addresses.size())
std::cout << ctx.active->vase.lines() << std::endl;
else
std::cout << addresses[0] << std::endl;
}
}
);
ctx.commands.insert(
"debug",
Command{