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

Avoid changing 'undolevels' when creating an undo break. #1534

Merged
merged 1 commit into from
Aug 5, 2023
Merged

Avoid changing 'undolevels' when creating an undo break. #1534

merged 1 commit into from
Aug 5, 2023

Commits on Aug 5, 2023

  1. Avoid changing 'undolevels' when creating an undo break.

    Setting the 'undolevels' option to any value has the side effect of
    creating an undo break.  UltiSnips uses the below construct to create an
    undo break with the goal of leaving 'undolevels' unmodified:
    
    ```
    :let &undolevels = &undolevels
    ```
    
    However, if a local 'undolevels' option has been set to a different
    value than the global option, the assignment above has the unintended
    effect of changing the global 'undolevels' value to the local value.
    
    Use `&g:undolevels` to explicitly read and modify only the global option
    value, avoiding undesired option changes.
    drmikehenry committed Aug 5, 2023
    Configuration menu
    Copy the full SHA
    f098b32 View commit details
    Browse the repository at this point in the history