Christian wrote:

> On Mi, 28 Mai 2014, Bram Moolenaar wrote:
> 
> > Christian Brabandt wrote:
> > 
> > > On Mo, 12 Mai 2014, Christian Brabandt wrote:
> > > 
> > > > Thanks, I enhanced it further. You can adjust the behaviour now using 
> > > > :set breakindentopt
> > > 
> > > For now, I put the patch here:
> > > 
> > > https://raw.githubusercontent.com/chrisbra/vim-mq-patches/master/breakindent_patch
> > > 
> > > I'll plan to keep it updated for a bit and will try to keep it in sync 
> > > with upstream Vim. If someone has problems with it (or I forgot to 
> > > update it) please ping me or open an issue (or something like that).
> > > 
> > > (There is also the vartabs patch. I haven't merged it for a while and 
> > > unfortunately, both of these patches collide a little bit).
> > 
> > A few remarks from looking at the patch.
> > 
> > There aren't any tests, while there are lots of changes to the source
> > code.  It would be really useful to have tests, instead of hoping that
> > later changes won't break the feature.
> 
> Hm, tests are hard for a visual feature. I think, I can implement 
> something, that will work using screenchar() function and should be 
> independent on screen width (and therefore also terminal width). That 
> will only work with +eval feature, but is better than nothing I think.

You can split the window horitontally and vertically to get one with a
fixed size.  Something like 40 wide and 15 high would always work.
Perhaps only the width really matters in this case.

> > The line number argument is added to lbr_chartabsize().  Instead it
> > should pass a pointer to the start of the line.  Fetching the line again
> > may cause trouble.  I also wonder if recomputing the indent every time
> > can't be avoided.  As far as I can see the result of the computation is
> > the same every time.  Perhaps the value can be cached for as long as
> > working on the same line.
> 
> Not sure on that one. I'll look into it.
> > 
> > The lnum argument to strdisplaywidth() doesn't work if the text is not
> > in the current window.  Instead the text for the indent should be
> > passed.
> 
> okay, will look into it.
> > The result of parsing breakindentopts should not be put in w_p_* fields.
> > These names are used for actual options, not parsed values.  Looks like
> > a leftover from when this was a bunch of options instead of one option
> > with several items.
> 
> Actually I thought about that one, but decided to keep those names, 
> because there is also w_p_cc_cols, which is also generated.
> 
> But will fix that.

w_p_cc_cols may be a bad choice for a name, but at least it's not
put in winopt_T.

> > The FIXME items need to be fixed...
> 
> I think, those can be removed and are not valid anymore.
> 
> It will take some time, until I can work on those items. Probably not 
> within the next 2 weeks (I'll be on vacation with my kids, so Vim won't 
> be my priority the next couple of days ;))

I'm surprised you get anything done when you have kids :-).

No hurry, just prefer to have this work properly before including the
patch and then getting bug reports.

-- 
hundred-and-one symptoms of being an internet addict:
230. You spend your Friday nights typing away at your keyboard

 /// 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].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui