workaround for vim cursor getting stuck on folded lines

This commit is contained in:
nightwing 2015-01-26 18:38:51 +04:00
commit 3e32d5bf7e

View file

@ -2396,6 +2396,15 @@ dom.importCssString(".normal-mode .ace_cursor{\
(line > last && cur.line == last)) {
return;
}
// /ace patch
var fold = cm.ace.session.getFoldAt(line, endCh);
if (fold) {
if (motionArgs.forward)
line = fold.end.row + 1;
else
line = fold.start.row - 1;
}
// /ace patche
if (motionArgs.toFirstChar){
endCh=findFirstNonWhiteSpaceCharacter(cm.getLine(line));
vim.lastHPos = endCh;