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/helix-core/src
Matouš Dzivjak 2e02a1d6bc
feat(commands): shrink_selection (#1340)
* feat(commands): shrink_selection

Add `shrink_selection` command that can be used to shrink
previously expanded selection.

To make `shrink_selection` work it was necessary to add
selection history to the Document since we want to shrink
the selection towards the syntax tree node that was initially
selected.

Selection history is cleared any time the user changes
selection other way than by `expand_selection`. This ensures
that we don't get some funky edge cases when user calls
`shrink_selection`.

Related: https://github.com/helix-editor/helix/discussions/1328

* Refactor shrink_selection, move history to view

* Remove useless comment

* Add default key mapping for extend&shrink selection

* Rework contains_selection method

* Shrink selection without expand selects first child
3 years ago
..
increment Remove `Clone` derive 3 years ago
auto_pairs.rs Auto pairs selection (#1254) 3 years ago
chars.rs Document more of helix-core (#904) 3 years ago
comment.rs Specify capacity on toggle_line_comments 3 years ago
diagnostic.rs feat(lsp): configurable diagnostic severity (#1325) 3 years ago
diff.rs Remove ExactSizeIterator requirement on Transaction::change 3 years ago
graphemes.rs Add hyperlinks to fix `cargo doc` warn (#931) 3 years ago
history.rs Add movement shortcut for history (#1088) 3 years ago
indent.rs Add llvm-mir highlighting (#1398) 3 years ago
lib.rs Detect workspace root using language markers (#1370) 3 years ago
line_ending.rs Mark a few functions as `const` 3 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 Apply recent nightly suggestions (#1286) 3 years ago
object.rs feat(commands): shrink_selection (#1340) 3 years ago
path.rs fix: Expand tilde first, then deal with relative paths 3 years ago
position.rs Ensure coords in screen depends on char width (#885) 3 years ago
register.rs Implement black hole register (#1165) 3 years ago
search.rs Switch to a cleaner range-head moving abstraction. 3 years ago
selection.rs feat(commands): shrink_selection (#1340) 3 years ago
shellwords.rs Open files with spaces in filename, allow opening multiple files (#1231) 3 years ago
state.rs Reduce State use a bit further 3 years ago
surround.rs Fix surround cursor position calculation (#1183) 3 years ago
syntax.rs Add llvm-mir highlighting (#1398) 3 years ago
textobject.rs Fix surround cursor position calculation (#1183) 3 years ago
transaction.rs Add auto pairs for same-char pairs (#1219) 3 years ago