| To: vim-dev@vim.org |
| Subject: Patch 7.1.229 |
| Fcc: outbox |
| From: Bram Moolenaar <Bram@moolenaar.net> |
| Mime-Version: 1.0 |
| Content-Type: text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding: 8bit |
| |
| |
| Patch 7.1.229 |
| Problem: A fold is closed when it shouldn't when 'foldmethod' is "indent" |
| and backspacing a non-white character so that the indent increases. |
| Solution: Keep the fold open after backspacing a character. |
| Files: src/edit.c |
| |
| |
| |
| |
| |
| *** 8618,8623 **** |
| --- 8619,8632 ---- |
| if (vim_strchr(p_cpo, CPO_BACKSPACE) != NULL && dollar_vcol == 0) |
| dollar_vcol = curwin->w_virtcol; |
| |
| + #ifdef FEAT_FOLDING |
| + /* When deleting a char the cursor line must never be in a closed fold. |
| + * E.g., when 'foldmethod' is indent and deleting the first non-white |
| + * char before a Tab. */ |
| + if (did_backspace) |
| + foldOpenCursor(); |
| + #endif |
| + |
| return did_backspace; |
| } |
| |
| |
| |
| |
| *** 668,669 **** |
| --- 668,671 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 229, |
| /**/ |
| |
| -- |
| ROBIN: (warily) And if you get a question wrong? |
| ARTHUR: You are cast into the Gorge of Eternal Peril. |
| ROBIN: Oh ... wacho! |
| "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD |
| |
| /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ |
| /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ |
| \\\ download, build and distribute -- http://www.A-A-P.org /// |
| \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |