Skip to content

Commit

Permalink
Auto pairs selection (#1254)
Browse files Browse the repository at this point in the history
* use auto pairs with selections

Previously, the auto pairs code was converting the user selection into
its cursor form, and setting the transaction's selection to that cursor.
This has the effect of destroying the user's selection if they type a
pair character that gets auto completed.

This fixes the code to work with the user's selection, inserting auto
pairs where appropriate, but either keeping or extending the user's
selection.

* use movement::Direction instead of bool

* assume 0-width cursor is forward
  • Loading branch information
dead10ck authored Dec 21, 2021
1 parent 1c082cb commit 5b4540f
Show file tree
Hide file tree
Showing 2 changed files with 275 additions and 80 deletions.
Loading

0 comments on commit 5b4540f

Please sign in to comment.