helix/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
2022-01-06 11:12:02 +09:00
..
clipboard.rs log syntax highlighting init errors (#895) 2021-10-23 21:52:18 +09:00
document.rs feat(ui): file encoding in statusline (#1355) 2021-12-26 00:10:46 +09:00
editor.rs Update settings at runtime (#798) 2021-12-26 10:04:33 +09:00
graphics.rs Bump rust to 1.57, fix new lint failures 2021-12-03 12:48:07 +09:00
gutter.rs Fix compilation 2021-12-06 12:50:28 +09:00
info.rs Implement key ordering for info box 2021-11-03 11:56:55 +09:00
input.rs Extract macro parsing to helix-view and add unit tests 2021-12-27 10:13:18 +09:00
keyboard.rs fix: Normalize backtab into shift-tab 2021-12-06 12:25:19 +09:00
lib.rs Extract gutters into helix-view 2021-11-29 11:00:28 +09:00
macros.rs Simplify view/doc macros 2021-11-18 14:13:42 +09:00
theme.rs Use base16_tty as 16-color default, fix theme name 2021-12-14 00:48:45 +09:00
tree.rs helix-term/commands: implement buffer-close (bc, bclose) (#1035) 2021-11-16 00:30:45 +09:00
view.rs feat(commands): shrink_selection (#1340) 2022-01-06 11:12:02 +09:00