diff options
| author | Albert Cervin <albert@acervin.com> | 2023-05-18 23:51:51 +0200 |
|---|---|---|
| committer | Albert Cervin <albert@acervin.com> | 2023-05-24 22:18:12 +0200 |
| commit | 4f3b576db6b01c8c88076985478e2a7fa37be340 (patch) | |
| tree | 9723ed39a19872fd52f2867613e78e02de3cf79b /src/dged/buffer.c | |
| parent | a4d17ddb8e7d23ccca13132f4d88cfc5f5730b76 (diff) | |
| download | dged-4f3b576db6b01c8c88076985478e2a7fa37be340.tar.gz dged-4f3b576db6b01c8c88076985478e2a7fa37be340.tar.xz dged-4f3b576db6b01c8c88076985478e2a7fa37be340.zip | |
TOML settings parsing
Currently a very simplistic parser that do not support all TOML
datatypes. Supported are:
- Tables
- Strings (incl multiline)
- Integers
- Inline Tables
- Booleans
- Comments
Diffstat (limited to 'src/dged/buffer.c')
| -rw-r--r-- | src/dged/buffer.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dged/buffer.c b/src/dged/buffer.c index 7e9789a..b3b3412 100644 --- a/src/dged/buffer.c +++ b/src/dged/buffer.c @@ -307,7 +307,7 @@ bool buffer_region_has_size(struct buffer_view *view) { struct text_chunk *copy_region(struct buffer *buffer, struct region region) { struct text_chunk *curr = &g_kill_ring.buffer[g_kill_ring.curr_idx]; - g_kill_ring.curr_idx = g_kill_ring.curr_idx + 1 % KILL_RING_SZ; + g_kill_ring.curr_idx = (g_kill_ring.curr_idx + 1) % KILL_RING_SZ; if (curr->allocated) { free(curr->text); @@ -405,6 +405,7 @@ void buffer_kill_line(struct buffer_view *view) { .col = view->dot.col + nchars, }, }; + copy_region(view->buffer, reg); delete_with_undo(view->buffer, view->dot, (struct buffer_location){ |
