Commit message (Collapse) | Author | Age | |
---|---|---|---|
* | Optimize Changeset::is_empty() | Blaž Hrastnik | 2021-02-16 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Checked the ASM output for these three options: pub enum Operation { /// Move cursor by n characters. Retain(usize), /// Delete n characters. Delete(usize), /// Insert text at position. Insert(String), } pub struct A { changes: Vec<Operation>, len: usize, } impl A { pub fn is_empty1(&self) -> bool { match self.changes.as_slice() { [] => true, [Operation::Retain(_)] => true, _ => false, } } /// `true` when the set is empty. pub fn is_empty2(&self) -> bool { let len = self.changes.len(); len == 0 || ( len == 1 && self.changes[0] == Operation::Retain(self.len) ) } pub fn is_empty3(&self) -> bool { match self.changes.as_slice() { [] | [Operation::Retain(_)] => true, _ => false } } } | ||
* | Since insert preceedes deletes, follow that ordering in Transaction::changes. | Blaž Hrastnik | 2021-02-16 |
| | | | | Produces the same output but will take the happy path. | ||
* | transaction: Use builder methods to generate compact changesets. | Blaž Hrastnik | 2021-02-16 |
| | |||
* | transaction: Merge consecutive inserts on compose. | Blaž Hrastnik | 2021-02-15 |
| | |||
* | fix test | Blaž Hrastnik | 2021-02-15 |
| | |||
* | Finally: Retain horizontal position when moving vertically. | Blaž Hrastnik | 2021-02-12 |
| | |||
* | simplify. | Blaž Hrastnik | 2021-02-05 |
| | |||
* | commands: Implement select_on_matches. | Blaž Hrastnik | 2021-01-22 |
| | |||
* | nix: include rust-src so rust-analyzer works correctly. | Blaž Hrastnik | 2021-01-19 |
| | |||
* | indent: Fix edge cases, refactor test. | Blaž Hrastnik | 2021-01-10 |
| | |||
* | Address clippy lints. | Blaž Hrastnik | 2021-01-08 |
| | |||
* | indent: refactor logic to be more correct. | Blaž Hrastnik | 2021-01-08 |
| | | | | | Thanks to atom-sane-indentation, nvim-treesitter and tree-sitter-indent.el for inspiration. | ||
* | wip | Blaž Hrastnik | 2020-12-03 |
| | |||
* | Text change generation, RPC call handling. | Blaž Hrastnik | 2020-12-03 |
| | |||
* | Introduce Selection::point. | Blaž Hrastnik | 2020-12-03 |
| | |||
* | Simplify old_state handling. | Blaž Hrastnik | 2020-12-03 |
| | |||
* | Fix undo/redo not updating the syntax tree. | Blaž Hrastnik | 2020-12-03 |
| | |||
* | Refactor: Document type as a wrapper around barebones State. | Blaž Hrastnik | 2020-12-03 |
| | |||
* | state.version tracking | Blaž Hrastnik | 2020-12-03 |
| | |||
* | Total mess but it works: diagnostic marking. | Blaž Hrastnik | 2020-12-03 |
| | |||
* | Reroute LSP notification events into the main app event loop. | Blaž Hrastnik | 2020-12-03 |
| | |||
* | Move theme from view to editor, support multiple views in editor. | Blaž Hrastnik | 2020-12-03 |
| | |||
* | Bugfix | Blaž Hrastnik | 2020-10-16 |
| | |||
* | added move left&right, delete char | Jan Hrastnik | 2020-10-16 |
| | |||
* | moved prompt command matching to prompt.rs | Jan Hrastnik | 2020-10-16 |
| | |||
* | modified editor.render() to prepare for command mode rendering | Jan Hrastnik | 2020-10-16 |
| | |||
* | wip | Blaž Hrastnik | 2020-10-15 |
| | |||
* | Auto-indent on enter based on tree-sitter scopes. | Blaž Hrastnik | 2020-10-14 |
| | |||
* | Share tab width definitions. | Blaž Hrastnik | 2020-10-14 |
| | |||
* | Validate compose len after applying a is same as before applying b. | Blaž Hrastnik | 2020-10-14 |
| | |||
* | Fix overlapping (insert | delete) compose | Blaž Hrastnik | 2020-10-14 |
| | |||
* | Fix compose not merging certain changesets correctly. | Blaž Hrastnik | 2020-10-14 |
| | |||
* | Indent draft, linewise paste | Blaž Hrastnik | 2020-10-13 |
| | |||
* | Don't try to compose zero-width deletes. | Blaž Hrastnik | 2020-10-13 |
| | |||
* | Simplify changeset tracking. | Blaž Hrastnik | 2020-10-13 |
| | |||
* | Cleanup | Blaž Hrastnik | 2020-10-13 |
| | |||
* | Simple yank/paste registers. | Blaž Hrastnik | 2020-10-13 |
| | |||
* | Fix changeset composition, lengths don't have to match. | Blaž Hrastnik | 2020-10-13 |
| | |||
* | Hacky undo/redo integration. | Blaž Hrastnik | 2020-10-13 |
| | |||
* | history.redo() | Blaž Hrastnik | 2020-10-13 |
| | |||
* | Split on matches off by one, breaks tests again. | Blaž Hrastnik | 2020-10-13 |
| | |||
* | Undo tree draft. | Blaž Hrastnik | 2020-10-13 |
| | | | | | We keep a tree of transactions. This allows for persistent undo by simply serializing the changesets. | ||
* | Drop Coords. | Blaž Hrastnik | 2020-10-07 |
| | |||
* | started work on goto mode | Jan Hrastnik | 2020-10-04 |
| | |||
* | Fix transaction.invert()/.apply() using byte counts instead of char counts. | Blaž Hrastnik | 2020-10-04 |
| | |||
* | Implement Transaction::invert. | Blaž Hrastnik | 2020-10-02 |
| | |||
* | Fix cursor rendering & placement on append mode. | Blaž Hrastnik | 2020-10-01 |
| | |||
* | argh -> clap to speed up compilation (no syn/proc_macro) | Blaž Hrastnik | 2020-10-01 |
| | |||
* | Fix test, break split + append | Blaž Hrastnik | 2020-09-29 |
| | |||
* | clippy warnings | Blaž Hrastnik | 2020-09-29 |
| |