> On So, 05 Dez 2021, Gary Johnson wrote:
> 
> > On 2021-11-18, Bram Moolenaar wrote:
> > > Patch 8.2.3615
> > > Problem:    When re-formatting with an indent expression the first line 
> > > of a
> > >             paragraph may get the wrong indent. (Martin F. Krafft)
> > > Solution:   Apply the correct indenting function for the first line.
> > >             (Christian Brabandt, closes #9150, closes #9056)
> > > Files:      src/textformat.c, src/testdir/test_indent.vim
> > 
> > This new behavior is a bug.  It has made vim less useful.
> > 
> > When I want to format, I want to format.  When I want to indent,
> > I want to indent.  I don't want formatting, e.g., gq, to also
> > indent.
> > 
> > I frequently have text that I have manually indented to my liking,
> > and I then want to format it so that the lines are properly wrapped.
> > I want those lines wrapped according to the current indentation, not
> > the current indentation rules.  If I want it indented according to
> > the current indentation rules, I will indent it with = first.
> > 
> > Please fix this.
> 
> The old behaviour already applied the indenting settings to all lines 
> *except* for the very first line, which caused inconsistent indented 
> lines. The patch simply makes sure to also apply the indenting to the 
> very first line.
> 
> I was also a bit confused that indenting applied to lines being 
> formatted because I always thought indenting and auto-formatting are 
> some different features. But I believe when auto-formatting and Vim is 
> breaking a very long line, it does make sense to apply the indenting 
> settings to the line being split.
> 
> Changing this behaviour now may break other users expectations. So I am 
> not sure how to fix this.

I'm not sure why you set up auto-indenting and do not want it to be
applied.  Auto-indenting triggers quite often, especially when adding a
linke break, since then the indent for the next line has to be decided.
And the line before is now done, so usually it also needs the indent to
be recomputed.

I guess the auto-indenting is not doing what you want, so you would need
to fix how it works.

-- 
Q:  What's a light-year?
A:  One-third less calories than a regular year.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            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/20211206110428.CA3791C0BD1%40moolenaar.net.

Raspunde prin e-mail lui