You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
helix-plus/helix-core/src
Mike Trinkala ef221abe83
Prevent a panic when uncommenting a line with only a comment token (#5933)
Open a new document `test.rs` and type the following:
`di//<esc><C-c>`

The margin calculation pushes the range out of bounds for the comment
marker when there are no characters (newline) after it.

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value:
Char range out of bounds: char range 0..3,
Rope/RopeSlice char length 2', ropey-1.6.0/src/rope.rs:546:37

The debug build catches the error in the transaction: thread 'main'
panicked at 'attempt to subtract with overflow',
helix-core/src/transaction.rs:503:26
2 years ago
..
doc_formatter rework positioning/rendering and enable softwrap/virtual text (#5420) 2 years ago
increment Fix new clippy lints (#5892) 2 years ago
auto_pairs.rs Fix erroneous indent between closers of auto-pairs (#5330) 2 years ago
chars.rs Temporarily turn on unicode-lines 3 years ago
comment.rs Prevent a panic when uncommenting a line with only a comment token (#5933) 2 years ago
config.rs Add support for local language configuration (#1249) 3 years ago
diagnostic.rs feat(lsp): add support for lsp Diagnostic{}.data (#4935) 2 years ago
diff.rs delete outdated reference to cessen/ropey#25 (#4928) 2 years ago
doc_formatter.rs rework positioning/rendering and enable softwrap/virtual text (#5420) 2 years ago
graphemes.rs rework positioning/rendering and enable softwrap/virtual text (#5420) 2 years ago
history.rs Fix transaction composition order in History::changes_since (#4981) 2 years ago
indent.rs Fix new clippy lints (#5892) 2 years ago
lib.rs rework positioning/rendering and enable softwrap/virtual text (#5420) 2 years ago
line_ending.rs properly handle LSP position encoding (#5711) 2 years ago
macros.rs Split parts of helix-term into helix-view. 4 years ago
match_brackets.rs Fix match brackets comment (#1346) 3 years ago
movement.rs Short-circuit the word and treesitter object movement commands (#5851) 2 years ago
object.rs Fix edge-case in tree-sitter expand_selection selection command (#2877) 2 years ago
path.rs Add workspace and document diagnostics picker (#2013) 2 years ago
position.rs rework positioning/rendering and enable softwrap/virtual text (#5420) 2 years ago
register.rs Refactor blackhole register (#4504) 2 years ago
search.rs Jump to the next number on the line before incrementing (#1778) 3 years ago
selection.rs rework positioning/rendering and enable softwrap/virtual text (#5420) 2 years ago
shellwords.rs Fix utf8 length handling for shellwords (#5738) 2 years ago
surround.rs Make `m` textobject look for pairs enclosing selections (#3344) 2 years ago
syntax.rs Fix new clippy lints (#5892) 2 years ago
test.rs Run clippy on workspace in CI (#4614) 2 years ago
text_annotations.rs rework positioning/rendering and enable softwrap/virtual text (#5420) 2 years ago
textobject.rs Make `m` textobject look for pairs enclosing selections (#3344) 2 years ago
transaction.rs properly handle LSP position encoding (#5711) 2 years ago
wrap.rs add reflow command (#2128) 3 years ago