Bram,
I find it irritating, that folds open on horizontal movements depending
on where the cursor is.
For example open fold.c, move the cursor to a closed fold, Move the
cursor to the end of the line ('$'), now the fold opens. Close the fold
and press 'l'. The closed fold does not open, because the cursor did not
move.
This happens sometimes to me and I find this confusing, that
sometimes the fold does not open and sometimes it does.
So here is a small patch, that fixes it.
diff --git a/src/normal.c b/src/normal.c
--- a/src/normal.c
+++ b/src/normal.c
@@ -6081,7 +6081,7 @@
#endif
}
#ifdef FEAT_FOLDING
- if (n != cap->count1 && (fdo_flags & FDO_HOR) && KeyTyped
+ if (n <= cap->count1 && (fdo_flags & FDO_HOR) && KeyTyped
&& cap->oap->op_type == OP_NOP)
foldOpenCursor();
#endif
@@ -6151,7 +6151,7 @@
}
}
#ifdef FEAT_FOLDING
- if (n != cap->count1 && (fdo_flags & FDO_HOR) && KeyTyped
+ if (n <= cap->count1 && (fdo_flags & FDO_HOR) && KeyTyped
&& cap->oap->op_type == OP_NOP)
foldOpenCursor();
#endif
regards,
Christian
--
Uns selbst zu achten, leitet unsre Sittlichkeit; andere zu
schätzen, regiert unser Betragen."
-- Goethe, Maximen und Reflektionen, Nr. 171
--
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