Adapted patch from Enrico by adding S-Tab handling.
Fixes bug #11085
cur.clearTargetX();
cur.macroModeClose();
if (!cur.inset().idxNext(cur)) {
- cur.idx() = firstIdx();
- cur.pos() = 0;
+ if (cur.lastidx() == 0)
+ cur.popForward();
+ else {
+ cur.idx() = firstIdx();
+ cur.pos() = 0;
+ }
}
break;
cur.clearTargetX();
cur.macroModeClose();
if (!cur.inset().idxPrev(cur)) {
- cur.idx() = cur.lastidx();
- cur.pos() = lyxrc.mac_like_cursor_movement ? cur.lastpos() : 0;
+ if (cur.lastidx() == 0)
+ cur.popBackward();
+ else {
+ cur.idx() = cur.lastidx();
+ cur.pos() = lyxrc.mac_like_cursor_movement ? cur.lastpos() : 0;
+ }
}
break;