Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save and restore selection, along with cursor position when switching from node to node #39

Closed
boltex opened this issue May 17, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@boltex
Copy link
Owner

boltex commented May 17, 2020

Save and restore selection, along with cursor position, from selection state saved in each node (or gnx array)

Addendum: Once implemented, this can be tested by trying to run the 'execute script' command on a text selection via leo's minibuffer (alt+x) instead of (ctrl+b) or the command palette (ctrl+shift+p).

Can clise this issue after removing the internal ctrl+b execute script to use leo's own command directly like the rest of normal commands.

@boltex boltex created this issue from a note in 0.2 Major Rewrite (Backlog) May 17, 2020
@boltex boltex self-assigned this May 17, 2020
@boltex boltex added the enhancement New feature or request label May 17, 2020
@boltex boltex changed the title Save and restore selection, along with cursor position when switching frmo node to node Save and restore selection, along with cursor position when switching from node to node May 22, 2020
@edreamleo
Copy link
Collaborator

edreamleo commented Jul 7, 2020

@boltex When switching nodes, Leo's core saves the insert point, selection, and vertical scroll position in the old (unselected) vnode. From v.init:

self.insertSpot = None
    # Location of previous insert point.
self.scrollBarSpot = None
    # Previous value of scrollbar position.
self.selectionLength = 0
    # The length of the selected body text.
self.selectionStart = 0
        # The start of the selected body text.

@boltex boltex moved this from Backlog to To do in 0.2 Major Rewrite Jul 26, 2020
@boltex boltex moved this from To do to Working On in 0.2 Major Rewrite Jul 28, 2020
@boltex boltex moved this from Working On to Done in Dev in 0.2 Major Rewrite Nov 30, 2020
@boltex boltex closed this as completed in 2463605 Apr 24, 2021
0.2 Major Rewrite automation moved this from Done in Dev to Done in Master Apr 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
0.2 Major Rewrite
  
Done in Master
Development

No branches or pull requests

2 participants