diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2017-03-02 00:09:12 +0100 | 
|---|---|---|
| committer | Justin M. Keyes <justinkz@gmail.com> | 2017-03-02 00:11:30 +0100 | 
| commit | 689e0daa95fc870e49f3eb2f23cd6a76c392ff7d (patch) | |
| tree | cba578caa7a222b62b9610db51340f82fe9306e8 /src/nvim/ops.c | |
| parent | 3c740f7424f232792609320b2093bbbd899ab11b (diff) | |
| download | rneovim-689e0daa95fc870e49f3eb2f23cd6a76c392ff7d.tar.gz rneovim-689e0daa95fc870e49f3eb2f23cd6a76c392ff7d.tar.bz2 rneovim-689e0daa95fc870e49f3eb2f23cd6a76c392ff7d.zip | |
vim-patch:8.0.0136
Problem:    When using indent folding and changing indent the wrong fold is
            opened. (Jonathan Fudger)
Solution:   Open the fold under the cursor a bit later. (Christian Brabandt)
https://github.com/vim/vim/commit/54b2bfa399017ebae76ed62f21578261d1b55c1f
Diffstat (limited to 'src/nvim/ops.c')
| -rw-r--r-- | src/nvim/ops.c | 5 | 
1 files changed, 3 insertions, 2 deletions
| diff --git a/src/nvim/ops.c b/src/nvim/ops.c index 8bfda3c193..530193bd41 100644 --- a/src/nvim/ops.c +++ b/src/nvim/ops.c @@ -210,8 +210,6 @@ void op_shift(oparg_T *oap, int curs_top, int amount)    }    changed_lines(oap->start.lnum, 0, oap->end.lnum + 1, 0L); -  /* The cursor line is not in a closed fold */ -  foldOpenCursor();    if (oap->motion_type == kMTBlockWise) {      curwin->w_cursor.lnum = oap->start.lnum; @@ -222,6 +220,9 @@ void op_shift(oparg_T *oap, int curs_top, int amount)    } else      --curwin->w_cursor.lnum;            /* put cursor on last line, for ":>" */ +  // The cursor line is not in a closed fold +  foldOpenCursor(); +    if (oap->line_count > p_report) {      if (oap->op_type == OP_RSHIFT)        s = (char_u *)">"; | 
