| To: vim_dev@googlegroups.com |
| Subject: Patch 7.4.118 |
| Fcc: outbox |
| From: Bram Moolenaar <Bram@moolenaar.net> |
| Mime-Version: 1.0 |
| Content-Type: text/plain; charset=UTF-8 |
| Content-Transfer-Encoding: 8bit |
| |
| |
| Patch 7.4.118 |
| Problem: It's possible that redrawing the status lines causes |
| win_redr_custom() to be called recursively. |
| Solution: Protect against recursiveness. (Yasuhiro Matsumoto) |
| Files: src/screen.c |
| |
| |
| |
| |
| |
| *** 6653,6658 **** |
| --- 6653,6659 ---- |
| win_T *wp; |
| int draw_ruler; /* TRUE or FALSE */ |
| { |
| + static int entered = FALSE; |
| int attr; |
| int curattr; |
| int row; |
| |
| *** 6671,6676 **** |
| --- 6672,6684 ---- |
| win_T *ewp; |
| int p_crb_save; |
| |
| + /* There is a tiny chance that this gets called recursively: When |
| + * redrawing a status line triggers redrawing the ruler or tabline. |
| + * Avoid trouble by not allowing recursion. */ |
| + if (entered) |
| + return; |
| + entered = TRUE; |
| + |
| /* setup environment for the task at hand */ |
| if (wp == NULL) |
| { |
| |
| *** 6746,6752 **** |
| } |
| |
| if (maxwidth <= 0) |
| ! return; |
| |
| /* Temporarily reset 'cursorbind', we don't want a side effect from moving |
| * the cursor away and back. */ |
| --- 6754,6760 ---- |
| } |
| |
| if (maxwidth <= 0) |
| ! goto theend; |
| |
| /* Temporarily reset 'cursorbind', we don't want a side effect from moving |
| * the cursor away and back. */ |
| |
| *** 6827,6832 **** |
| --- 6835,6843 ---- |
| while (col < Columns) |
| TabPageIdxs[col++] = fillchar; |
| } |
| + |
| + theend: |
| + entered = FALSE; |
| } |
| |
| #endif /* FEAT_STL_OPT */ |
| |
| |
| |
| *** 740,741 **** |
| --- 740,743 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 118, |
| /**/ |
| |
| -- |
| Nothing is fool-proof to a sufficiently talented fool. |
| |
| /// Bram Moolenaar -- Bram@Moolenaar.net -- 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 /// |