On Thu, Jun 26, 2014 at 2:47 PM, Charles <[email protected]> wrote: > On Thu, Jun 26, 2014 at 1:36 PM, Christian Brabandt <[email protected]> > wrote: > >> Am 2014-06-26 04:39, schrieb Charles: >> >> On Thu, Jun 26, 2014 at 4:30 AM, Christian Brabandt >>> <[email protected]> wrote: >>> >>> On Mi, 25 Jun 2014, itchyny wrote: >>>> >>>> To reproduce >>>>> vim -u NONE -N >>>>> 500ia<ESC>^ >>>>> >> >>>>> set wrap breakindent >>>>> set breakindentopt=shift:10 >>>>> hlhlhlwbwb >>>>> x >>>>> >>>>> Problem >>>>> The indentation is not updated soon after we change >>>>> >>>> breakindentopt. >>>> >>>>> >>>>> Expected behaviour >>>>> The indentation is updated soon. >>>>> >>>> >>>> Yes, I noticed that too. >>>> >>>> diff --git a/src/misc1.c b/src/misc1.c >>>> --- a/src/misc1.c >>>> +++ b/src/misc1.c >>>> @@ -513,11 +513,11 @@ get_breakindent_win(wp, line) >>>> prev_ts = wp->w_buffer->b_p_ts; >>>> prev_tick = wp->w_buffer->b_changedtick; >>>> prev_indent = get_indent_str(line, >>>> - (int)wp->w_buffer->b_p_ts, wp->w_p_list) + >>>> wp->w_p_brishift; >>>> - } >>>> - >>>> + (int)wp->w_buffer->b_p_ts, wp->w_p_list); >>>> + } >>>> + >>>> + bri = prev_indent + wp->w_p_brishift; >>>> /* indent minus the length of the showbreak string */ >>>> - bri = prev_indent; >>>> if (wp->w_p_brisbr) >>>> bri -= vim_strsize(p_sbr); >>>> >>> >>> Hi, >>> >>> The patch doesn't seem to fix the problem. >>> >>> I have this settings in my vimrc >>> >>> set breakindent >>> set breakindentopt=min:20,shift:2 >>> >>> But the shift is not applied. It only get applied if I type set >>> breakindentopt=min:20,shift:2 when editing the buffer or using an >>> autocmd >>> >>> autocmd BufNew * set breakindentopt=min:20,shift:2,sbr >>> >> >> I suspect this is a different problem, because this works for me and I >> can't reproduce your problem. >> > > After comparing the patch, I think the cause is the patch sent by Bram in > 7.4.338 is different with your patch in github. For example patch 338 does > not have wo_brishift in the window struct. > > The problem is that now it will be complicated to apply the latest patch > on top of current vim source since part of it has already been merged. >
Hi, Attached is Christian's breakindent patch (from github) rebased to 7.4.345. -- -- 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.
7.4.345-breakindent.patch
Description: Binary data
