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

fix(executor): Preserve type of visual mode #388

Merged
merged 2 commits into from
Jun 29, 2023

Conversation

notEvil
Copy link

@notEvil notEvil commented Jun 29, 2023

Resolves: #375

How to Test

  1. select a range with v, V or <c-v>
  2. escape
  3. select a range with a different type and leave the cursor on either side
  4. start legendary and choose a builtin motion (e.g. "Start of next word")
  5. assert the type of visual mode and cursor side didn't change

Testing for Regressions

I have tested the following:

  • Triggering keymaps from legendary.nvim in all modes (normal, insert, visual)
  • Creating keymaps via legendary.nvim, then triggering via the keymap in all modes (normal, insert, visual)
  • Triggering commands from legendary.nvim in all modes (normal, insert, visual)
  • Creating commands via legendary.nvim, then running the command manually from the command line
  • augroup/autocmds created through legendary.nvim work correctly

lua/legendary/api/executor.lua Outdated Show resolved Hide resolved
lua/legendary/api/executor.lua Outdated Show resolved Hide resolved
@mrjones2014
Copy link
Owner

Also looks like the stylua check is failing.

@mrjones2014
Copy link
Owner

Thanks for the PR!!

@mrjones2014 mrjones2014 merged commit 09beae8 into mrjones2014:master Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Visual mode is not preserved
2 participants