Mercurial > vim
comparison src/normal.c @ 2139:35effbd07a25 v7.2.421
updated for version 7.2.421
Problem: Folds are sometimes not updated properly and there is no way to
force an update.
Solution: Make "zx" and "zX" recompute folds (suggested by Christian
Brabandt)
author | Bram Moolenaar <bram@zimbu.org> |
---|---|
date | Thu, 13 May 2010 17:35:59 +0200 |
parents | 279380a812ad |
children | c6f1aa1e9f32 |
comparison
equal
deleted
inserted
replaced
2138:78b9d5dce950 | 2139:35effbd07a25 |
---|---|
4934 case 'v': foldOpenCursor(); | 4934 case 'v': foldOpenCursor(); |
4935 break; | 4935 break; |
4936 | 4936 |
4937 /* "zx": re-apply 'foldlevel' and open folds at the cursor */ | 4937 /* "zx": re-apply 'foldlevel' and open folds at the cursor */ |
4938 case 'x': curwin->w_p_fen = TRUE; | 4938 case 'x': curwin->w_p_fen = TRUE; |
4939 newFoldLevel(); /* update right now */ | 4939 curwin->w_foldinvalid = TRUE; /* recompute folds */ |
4940 newFoldLevel(); /* update right now */ | |
4940 foldOpenCursor(); | 4941 foldOpenCursor(); |
4941 break; | 4942 break; |
4942 | 4943 |
4943 /* "zX": undo manual opens/closes, re-apply 'foldlevel' */ | 4944 /* "zX": undo manual opens/closes, re-apply 'foldlevel' */ |
4944 case 'X': curwin->w_p_fen = TRUE; | 4945 case 'X': curwin->w_p_fen = TRUE; |
4945 old_fdl = -1; /* force an update */ | 4946 curwin->w_foldinvalid = TRUE; /* recompute folds */ |
4947 old_fdl = -1; /* force an update */ | |
4946 break; | 4948 break; |
4947 | 4949 |
4948 /* "zm": fold more */ | 4950 /* "zm": fold more */ |
4949 case 'm': if (curwin->w_p_fdl > 0) | 4951 case 'm': if (curwin->w_p_fdl > 0) |
4950 --curwin->w_p_fdl; | 4952 --curwin->w_p_fdl; |