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

Handle conflicts when 2 modes are activated simultaneously #2

Open
csd1100 opened this issue Jan 23, 2024 · 0 comments
Open

Handle conflicts when 2 modes are activated simultaneously #2

csd1100 opened this issue Jan 23, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@csd1100
Copy link
Owner

csd1100 commented Jan 23, 2024

Suppose there are two modes A, B and they are activated one after other.
Then behavior should be of last-in-wins. i.e. keymaps of B will be used.
For conflicts following should be the behavior:

Step 1: When mode A is activated:

  1. Any existing global keymaps that conflict should be backed up
  2. Keymaps defined for A should be applied

Step 2. When mode B is activated:

  1. Any existing global keymaps that conflict with B should be backed up
  2. Any keymaps for A that conflict with B should be backed up
  3. Keymaps defined for B should be applied

Step 3: Mode deactivation scenarios

If A is deactivated first:

  1. All maps of A that do not conflict with B should removed.
  2. Maps of B should not be touched.
  3. Keys backed up by B for A should be replaced with keys backed up by A.
  4. When B deactivates Backup created by B should be applied along with replaced
    maps in above step.

If B is deactivated first:

  1. All maps of B should be removed.
  2. Backup of existing keys including backed up maps of A should be applied.
@csd1100 csd1100 added the bug Something isn't working label Jan 23, 2024
@csd1100 csd1100 self-assigned this Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant