Gary Johnson wrote:
> A change was made to the 'comments' setting in ftplugin/vim.vim at
> commit 7ff78465f7057a672a6de0d75d56286da253501b (between 8.2.1175
> and 8.2.1176) that introduced a change in formatting behavior that
> I think is a bug.
>
> The setting of the 'comments' option was changed from this:
>
> setlocal com=sO:\"\ -,mO:\"\ \ ,eO:\"\",:\"
>
> to this:
>
> setlocal com=sO:\"\ -,mO:\"\ \ ,sO:#\ -,mO:#\ \ ,eO:##,:\",:#
>
> It appears that the purpose was to add # as a comment leader for
> Vim9, but the change also removed the end string of the original
> three-piece comment definition for the " comment leader.
>
> The problem this causes is that when entering a comment containing
> an indented line that contains a ", the comment leader is not
> automatically inserted at the start of the next line. Here is an
> example, with 'filetype' set to "vim".
>
> " When these lines are ended by pressing <Enter>,
> " a " is automatically inserted at the start of
> " each next line. This is good.
> "
> " This line is indented. Pressing <Enter> here
> " also automatically starts this line with ".
> But because of that second " in the line above, this line
> did not start with a ". The comment was terminated. This
> is bad.
>
> The attached patch should fix the problem. The patch was made
> against Vim 8.2.2519.
Thanks for reporting, I'll include the fix.
--
TALL KNIGHT: When you have found the shrubbery, then you must cut down the
mightiest tree in the forest ... with a herring.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202102200730.11K7UeBG2911280%40masaka.moolenaar.net.