Commit Graph

46 Commits

Author SHA1 Message Date
Matthew Gordon ea49d93e14 Factor out repeated code in EditorBuffer tests 2025-11-27 21:46:53 -04:00
Matthew Gordon 28ce802116 Implement EditorBuffer::move_cursor_to_line_number() 2025-11-27 21:26:46 -04:00
Matthew Gordon 5d82c84239 Update cursor correctly when inserting newlines 2025-11-27 21:26:12 -04:00
Matthew Gordon 995f1657cd Make some fields in CommandResponse public 2025-11-27 21:25:37 -04:00
Matthew Gordon 41e9c197cd Refactor EditorBuffer and TextBuffer to be immutable 2025-11-15 21:11:47 -04:00
Matthew Gordon 4188301e79 Remove debug print 2025-11-15 19:56:59 -04:00
Matthew Gordon 996920e07f Optimize test builds 2025-11-15 19:56:40 -04:00
Matthew Gordon 1934af8b72 Add ability to insert at line and column 2025-11-15 19:55:44 -04:00
Matthew Gordon a8ce6e8e59 Add very basic cursor control 2025-11-14 20:32:03 -04:00
Matthew Gordon f33d51f931 Implement OpenFile command 2025-11-14 20:14:47 -04:00
Matthew Gordon 69d87ef680 Clean up library exports and docs 2025-11-10 21:05:43 -04:00
Matthew Gordon 47a5ccb575 Implement EditorBuffer::save_file()
Needs more tests though.
2025-11-10 20:54:50 -04:00
Matthew Gordon acd456c22a Move file IO functions in EditorBuffer to io submodule 2025-11-10 20:28:07 -04:00
Matthew Gordon 1634e64ebf Implement EditorBuffer::open_file() 2025-11-10 20:09:21 -04:00
Matthew Gordon 304bf4da6c Fix bug in TextBufferWriter with multibyte chars
Fixed a UTF-8 decoding error that would occur if the `buf` argument to
`TextBufferWriter` ended in the middle of a multibyte character.
2025-11-10 19:52:31 -04:00
Matthew Gordon 36ab1b1769 Add EditorBuffer and Command; stubs for a few commands 2025-11-10 15:40:35 -04:00
Matthew Gordon 1de9569beb Add some documentation 2025-11-10 13:34:05 -04:00
Matthew Gordon 00e4959055 Remove unused code 2025-11-10 13:24:14 -04:00
Matthew Gordon e01210f679 Add TextBufferWriter 2025-11-10 13:24:04 -04:00
Matthew Gordon d95ab09180 Create io::Reader instance for TextBuffer 2025-11-10 12:33:07 -04:00
Matthew Gordon 01b1ed1591 Test adding strings at end of TextBuffer 2025-11-10 12:32:15 -04:00
Matthew Gordon 4ca32decc9 Remove unused function Rope::is_leaf() 2025-10-30 21:49:37 -03:00
Matthew Gordon ef375f6472 Remove old dbg!() 2025-10-30 21:49:07 -03:00
Matthew Gordon 529ac555ec Expose some Rope functions through TextBuffer
This is mostly just to silence unused code warnings for now.
2025-10-30 21:48:10 -03:00
Matthew Gordon 0ae501d150 Change Rust edition to 2024 2025-10-30 21:46:29 -03:00
Matthew Gordon c9aa5290e9 Add stub TUI app 2025-10-30 20:08:50 -03:00
Matthew Gordon 7b7e307a51 Add `impl Default` for TextBuffer 2025-10-21 22:13:56 -03:00
Matthew Gordon a621985347 Finding shape of things after leaving rope unfinished 2025-10-21 22:12:25 -03:00
Matthew Gordon fff7595b9a Minor fixes 2025-10-18 21:31:48 -03:00
Matthew Gordon aa250a8145 Update rand crate (only used in tests) 2025-10-18 21:21:50 -03:00
Matthew Gordon 2b959e5a68 Do some automated random testing of Rope 2024-11-09 11:35:27 -04:00
Matthew Gordon 454e2f12fe Make rope module directory
Replace `rope.rs` with `rope/mod.rs` and `rope/tests/mod.rs` in
preparation for adding more elaborate testing for `Rope`.
2024-11-08 22:02:23 -04:00
Matthew Gordon c2f71aac22 Add Rope::iter_chars_with_point() 2024-10-21 21:37:36 -03:00
Matthew Gordon f92e86601e Move ged-core into workspace 2024-10-21 12:54:30 -03:00
Matthew Gordon 78f8bd5fc4 Add Rope::delete_at_char_index() 2024-10-19 22:01:01 -03:00
Matthew Gordon c3ebef8fc1 Add Rope::insert_char_at_index() 2024-10-19 21:47:30 -03:00
Matthew Gordon 1164922ffe Rearrange rope.rs a little 2024-10-19 21:22:02 -03:00
Matthew Gordon 511f56872a Add Rope::rebalance() 2024-10-19 21:17:02 -03:00
Matthew Gordon b2ef8cc284 Add core::fibbonacci::fibbonacci() 2024-10-19 20:24:17 -03:00
Matthew Gordon 3873e5561f Add Rope::depth() 2024-10-19 15:00:57 -03:00
Matthew Gordon a22968456c Add Rope::split() and Rope::empty() 2024-10-19 15:00:23 -03:00
Matthew Gordon f85a771071 Add more documentation comments 2024-10-18 20:26:33 -03:00
Matthew Gordon 087c2bad9b Add Rope::iter_nodes and Rope::iter_chars 2024-10-18 20:14:52 -03:00
Matthew Gordon 73168d3c0b In-progress implementation of rope
Just the beginnings of a rope implementation but I want to refactor
already so saving what I've got so far.
2024-10-17 19:44:13 -03:00
Matthew Gordon d967dfe405 Add *~ to .gitignore 2024-10-17 19:44:13 -03:00
Matthew Gordon 1c4e2f7521 Initial commit 2024-01-01 15:06:43 +00:00