preservim / nerdcommenter

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

fix issues with placeholders not being replaced by real comment strings when uncommenting #507

Closed lincheney closed 1 year ago

lincheney commented 1 year ago

Recompute indxLeft and indxLeftAlt after line has changed.

Further on, the code checks if indxLeftPlace < indxLeft to determine whether there is a placeholder, however the indxLeft is wrong as it is first computed before the line is uncommented but indxLeftPlace is computed after uncommenting.

Related to this PR that was never merged: https://github.com/preservim/nerdcommenter/pull/226 Related issue: https://github.com/preservim/nerdcommenter/issues/68