workaround for vim cursor getting stuck on folded lines
This commit is contained in:
parent
0da0566bac
commit
3e32d5bf7e
1 changed files with 9 additions and 0 deletions
|
|
@ -2396,6 +2396,15 @@ dom.importCssString(".normal-mode .ace_cursor{\
|
||||||
(line > last && cur.line == last)) {
|
(line > last && cur.line == last)) {
|
||||||
return;
|
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){
|
if (motionArgs.toFirstChar){
|
||||||
endCh=findFirstNonWhiteSpaceCharacter(cm.getLine(line));
|
endCh=findFirstNonWhiteSpaceCharacter(cm.getLine(line));
|
||||||
vim.lastHPos = endCh;
|
vim.lastHPos = endCh;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue