fix bug #571, also for insettabular

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8910 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2004-08-13 20:14:32 +00:00
parent 94d27f8a11
commit 48aa5d66cf
3 changed files with 24 additions and 15 deletions

View File

@ -942,6 +942,8 @@ FuncStatus BufferView::Pimpl::getStatus(FuncRequest const & cmd)
case LFUN_MARK_ON:
case LFUN_SETMARK:
case LFUN_CENTER:
case LFUN_BEGINNINGBUF:
case LFUN_ENDBUF:
case LFUN_BEGINNINGBUFSEL:
case LFUN_ENDBUFSEL:
flag.enabled(true);

View File

@ -542,15 +542,11 @@ void MathNestInset::priv_dispatch(LCursor & cur, FuncRequest & cmd)
case LFUN_PRIORSEL:
case LFUN_PRIOR:
case LFUN_BEGINNINGBUFSEL:
case LFUN_BEGINNINGBUF:
cmd = FuncRequest(LFUN_FINISHED_LEFT);
break;
case LFUN_NEXTSEL:
case LFUN_NEXT:
case LFUN_ENDBUFSEL:
case LFUN_ENDBUF:
cmd = FuncRequest(LFUN_FINISHED_RIGHT);
break;

View File

@ -455,17 +455,25 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
break;
case LFUN_BEGINNINGBUF:
if (cur.size() == 1) {
if (!cur.mark())
cur.clearSelection();
cursorTop(cur);
finishChange(cur, false);
} else {
cur.undispatched();
}
break;
case LFUN_ENDBUF:
if (cur.size() == 1) {
if (!cur.mark())
cur.clearSelection();
cursorBottom(cur);
finishChange(cur, false);
} else {
cur.undispatched();
}
break;
case LFUN_RIGHT:
@ -1827,8 +1835,6 @@ bool LyXText::getStatus(LCursor & cur, FuncRequest const & cmd,
case LFUN_DELETE_LINE_FORWARD:
case LFUN_WORDRIGHT:
case LFUN_WORDLEFT:
case LFUN_ENDBUF:
case LFUN_BEGINNINGBUF:
case LFUN_RIGHT:
case LFUN_RIGHTSEL:
case LFUN_LEFT:
@ -1937,6 +1943,11 @@ bool LyXText::getStatus(LCursor & cur, FuncRequest const & cmd,
enable = true;
break;
case LFUN_ENDBUF:
case LFUN_BEGINNINGBUF:
enable = true;
break;
default:
enable = false;
break;