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(autocommands): Correct column preservation behavior in TWDisable #24

Merged
merged 1 commit into from
Oct 20, 2024

Conversation

joshuadanpeterson
Copy link
Owner

Description:
This pull request addresses an issue where the TWDisable command failed to fully disable column preservation, leading to unintended modifications of the cursor column after running the command. This fix ensures that the autocmd responsible for column preservation is correctly cleared when TWDisable is executed.

Changes:
Added a check within TWDisable to detect if column preservation is active and reset the state to NORMAL.
Included logic to clear any CursorMoved autocmds that might interfere with cursor behavior after disabling typewriter mode.
Provided feedback through a message indicating that column preservation has been disabled.

Testing:
Tested the TWDisable command to verify that column preservation is fully deactivated after use.
Ensured that all related autocmds are cleared, and the cursor behaves as expected without column modifications.

Related Issues:
Resolves Issue #20: TWDisable doesn’t disable the autocmd that modifies the column.

…mmand

- Added logic to check if column preservation is active when running the TWDisable command.
- Reset column preservation state to NORMAL to ensure proper behavior when disabling typewriter mode.
- Cleared relevant autocmds related to column preservation and cursor movement (CursorMoved event).
- This ensures that after TWDisable is run, the column remains unmodified and behaves as expected.
@joshuadanpeterson joshuadanpeterson added the bug Something isn't working label Oct 20, 2024
@joshuadanpeterson joshuadanpeterson self-assigned this Oct 20, 2024
@joshuadanpeterson
Copy link
Owner Author

@joshuadanpeterson joshuadanpeterson merged commit 85f35da into main Oct 20, 2024
1 check passed
@joshuadanpeterson joshuadanpeterson deleted the twdisable-autocmd-column-preservation branch October 20, 2024 05:48
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

Successfully merging this pull request may close these issues.

[Bug] TWDisable doesnt disable the autocmd that modifies the column
1 participant