preservim / nerdcommenter

Vim plugin for intensely nerdy commenting powers
Creative Commons Zero v1.0 Universal
4.99k stars 445 forks source link

Fix alternative delimiter usage in alternate buffers #531

Closed svalaskevicius closed 2 months ago

svalaskevicius commented 9 months ago

Copy the configuration for a file rather than capture by reference.

Due to the logic in the alternative delimiter configurator, which swaps the delimiters when called, every second buffer the script is used swaps the delimiter order in the original config. This leads to incorrect delimiters being used in every second buffer.

This change makes a copy for each buffer so swapping the order will not affect the next loaded buffer.