aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src/comment.rs
Commit message (Collapse)AuthorAge
* Fixes for new clippy lints in Rust 1.54.Nathan Vegdahl2021-07-29
|
* Merge branch 'master' into great_line_ending_and_cursor_range_cleanupNathan Vegdahl2021-07-26
|\
| * Determine whether to use a margin of 0 or 1 when uncommenting (#476)Omnikar2021-07-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement `margin` calculation for uncommenting * Move `margin` calculation to `find_line_comment` * Fix comment bug with multiple selections on a line * Fix `find_line_comment` test for new return type * Generate a single vec of lines for comment toggle `toggle_line_comments` collects the lines covered by all selections into a `Vec`, skipping duplicates. `find_line_comment` now returns the lines to operate on, instead of returning the lines to skip. * Fix test for `find_line_comment` * Reserve length of `to_change` instead of `lines` The length of `lines` includes blank lines which will be skipped, and as such do not need space for a change reserved for them. `to_change` includes only the lines which will be changed. * Use `token.chars().count()` for token char length * Create `changes` with capacity instead of reserving * Remove unnecessary clones in `test_find_line_comment` * Add test case for 0 margin comments * Add comments explaining `find_line_comment`
* | Fix comment toggle command also sometimes toggling the next line.Nathan Vegdahl2021-07-20
|/
* Made toggle_comments language dependent (#463)Cor Peters2021-07-18
| | | | | | | | | | | | | * Made toggle_comments language dependent * Fixed Test Cases * Added clippy suggestion * Small Fixes * Clippy Suggestion Co-authored-by: Cor <prive@corpeters.nl>
* fix: crash with ctrl-c on empty fileBlaž Hrastnik2021-06-23
|
* Cleanup find_first_non_whitespace_char funcsWojciech Kępka2021-06-08
|
* Fully drop State references.Blaž Hrastnik2021-03-31
|
* clippy lintBlaž Hrastnik2021-03-24
|
* Implement iter() and len() directly on Selection.Blaž Hrastnik2021-03-19
|
* Remove State from a few more signatures.Blaž Hrastnik2021-03-18
|
* Make Transaction::change only rely on the rope.Blaž Hrastnik2021-03-18
|
* commands: Wire up toggle comments as ctrl-cBlaž Hrastnik2021-02-19
|
* core: Implement comment toggling module.Blaž Hrastnik2021-02-18