Make Shift-End and Shift-Pos1 work as expected

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2629 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2001-08-30 10:17:28 +00:00
parent 1ac1b8e07b
commit 77306b7e24
4 changed files with 15 additions and 9 deletions

View File

@ -412,13 +412,19 @@ InsetFormulaBase::localDispatch(BufferView * bv, kb_action action,
updateLocal(bv, false);
break;
case LFUN_HOMESEL:
sel = true;
case LFUN_HOME:
mathcursor->home();
mathcursor->home(sel);
updateLocal(bv, false);
break;
case LFUN_ENDSEL:
sel = true;
case LFUN_END:
mathcursor->end();
mathcursor->end(sel);
updateLocal(bv, false);
break;
@ -492,8 +498,6 @@ InsetFormulaBase::localDispatch(BufferView * bv, kb_action action,
mathcursor->selCopy();
break;
case LFUN_HOMESEL:
case LFUN_ENDSEL:
case LFUN_WORDRIGHTSEL:
case LFUN_WORDLEFTSEL:
break;

View File

@ -368,9 +368,10 @@ void MathCursor::setPos(int x, int y)
}
void MathCursor::home()
void MathCursor::home(bool sel)
{
dump("home 1");
selHandle(sel);
macroModeClose();
lastcode_ = LM_TC_VAR;
if (!par()->idxHome(idx(), pos()))
@ -379,9 +380,10 @@ void MathCursor::home()
}
void MathCursor::end()
void MathCursor::end(bool sel)
{
dump("end 1");
selHandle(sel);
macroModeClose();
lastcode_ = LM_TC_VAR;
if (!par()->idxEnd(idx(), pos()))

View File

@ -73,9 +73,9 @@ public:
///
void backspace();
///
void home();
void home(bool sel = false);
///
void end();
void end(bool sel = false);
///
bool right(bool sel = false);
///

View File

@ -439,7 +439,7 @@ void Parser::tokenize(string const & buffer)
}
}
#if 1
#if 0
lyxerr << "\nTokens: ";
for (unsigned i = 0; i < tokens_.size(); ++i)
lyxerr << tokens_[i];