Fix a few bugs.

- Moving lines after themselves didnt work.
- moving empty lines deleted them.
- "w" didnt set state to unmodified in generic buffers.
- in "hl" aligned the numbers (by digits)
This commit is contained in:
2026-09-11 22:35:06 +01:00
parent a8d51dc0b6
commit 3346bc9f83
11 changed files with 31 additions and 15 deletions
+1
View File
@@ -34,6 +34,7 @@ struct Buffer {
virtual uint64_t bytes() = 0;
virtual void set_filename(std::filesystem::path path) = 0;
virtual std::filesystem::path filename() = 0;
virtual void saved_hook() = 0;
virtual void load(BEd &ctx, vase::Shard *text) = 0;
virtual vase::Shard *copy(uint64_t start_line, uint64_t end_line) = 0;
virtual void substitute(
+1
View File
@@ -10,6 +10,7 @@ struct ClipBuffer : Buffer {
void clip_write(vase::Shard *text);
bool waste() override;
void saved_hook() override;
uint64_t lines() override;
uint64_t bytes() override;
void load(BEd &ctx, vase::Shard *text) override;
+1
View File
@@ -31,6 +31,7 @@ struct GenericBuffer : ShardBuffer {
bool undo(BEd &ctx);
bool redo(BEd &ctx);
uint64_t prune(int);
void saved_hook() override;
bool waste() override;
void load(BEd &ctx, vase::Shard *text) override;
void set_filename(std::filesystem::path path) override;
+1
View File
@@ -12,6 +12,7 @@ struct ReadonlyBuffer : ShardBuffer {
const syntax::ParserSnapshot &snapshot
) : ShardBuffer(std::move(name), root, snapshot, Kind::History) {}
void saved_hook() override {}
bool waste() override {
return useless;
}