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-view/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
..
clipboard.rs log syntax highlighting init errors (#895) 3 years ago
document.rs feat(ui): file encoding in statusline (#1355) 3 years ago
editor.rs Update settings at runtime (#798) 3 years ago
graphics.rs Bump rust to 1.57, fix new lint failures 3 years ago
gutter.rs Fix compilation 3 years ago
info.rs Implement key ordering for info box 3 years ago
input.rs Extract macro parsing to `helix-view` and add unit tests 3 years ago
keyboard.rs fix: Normalize backtab into shift-tab 3 years ago
lib.rs Extract gutters into helix-view 3 years ago
macros.rs Simplify view/doc macros 3 years ago
theme.rs Use `base16_tty` as 16-color default, fix theme name 3 years ago
tree.rs helix-term/commands: implement buffer-close (bc, bclose) (#1035) 3 years ago
view.rs feat(commands): shrink_selection (#1340) 3 years ago