mirror of
https://github.com/preservim/nerdcommenter.git
synced 2025-11-08 09:53:47 -05:00
* Simplify comment delimiter insertion.
* Remove the code that unnecessarily touches the leading spaces/tabs.
* Fix a bug in which `<Plug>NERDCommenterInsert` inserts the comment
delimiters in a wrong position when `col('.')==1`.
Example: `1|234` (cursor at `|`) → `/* */1234`.
* NOTE: Should avoid `feedkey(.., 'ni')` for inserting comment
delimiters to ensure that `NERDCommenter_after` is called after
inserting the delimiters. `feedkey` only adds the input to the queue,
which will be processed after exiting the script context. On the other
hand, `:normal` and `feedkey(.., 'x')` are eagerly processed.