Fix the "can't move out of nested text insets using pageup/down"

and a few cases of the "can't scroll over large notes" annoyances.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5381 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2002-10-11 10:45:28 +00:00
parent f789d1a4be
commit 816344ab1d
5 changed files with 39 additions and 11 deletions

View File

@ -1,3 +1,8 @@
2002-10-11 André Pönitz <poenitz@gmx.net>
* lytext.h: make some functions public to allow access
from inset/lyxtext for handling LFUN_PRIOR/NEXT
2002-10-09 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* text3.C (dispatch): when changing layout, avoid an infinite loop

View File

@ -1,7 +1,12 @@
2002-10-11 André Pönitz <poenitz@gmx.net>
* insettext.h: handle LFUN_PRIOR/NEXT
2002-07-30 Juergen Spitzmueller <j.spitzmueller@gmx.de>
* insetfloat.C: fix bug with float settings
(document default != float default).
* insetfloat.C: fix bug with float settings
(document default != float default).
2002-09-24 Dekel Tsur <dekelts@tau.ac.il>

View File

@ -1340,6 +1340,24 @@ Inset::RESULT InsetText::localDispatch(FuncRequest const & ev)
lt->cursorEnd(bv);
updwhat = CURSOR;
break;
case LFUN_PRIOR:
if (!crow(bv)->previous())
result = FINISHED_UP;
else {
lt->cursorPrevious(bv);
result = DISPATCHED_NOUPDATE;
}
updwhat = CURSOR;
break;
case LFUN_NEXT:
if (!crow(bv)->next())
result = FINISHED_DOWN;
else {
lt->cursorNext(bv);
result = DISPATCHED_NOUPDATE;
}
updwhat = CURSOR;
break;
case LFUN_BACKSPACE: {
setUndo(bv, Undo::DELETE,
lt->cursor.par(), lt->cursor.par()->next());
@ -1896,8 +1914,7 @@ InsetText::moveLeftIntern(BufferView * bv, bool front,
}
Inset::RESULT
InsetText::moveUp(BufferView * bv)
Inset::RESULT InsetText::moveUp(BufferView * bv)
{
if (!crow(bv)->previous())
return FINISHED_UP;
@ -1906,8 +1923,7 @@ InsetText::moveUp(BufferView * bv)
}
Inset::RESULT
InsetText::moveDown(BufferView * bv)
Inset::RESULT InsetText::moveDown(BufferView * bv)
{
if (!crow(bv)->next())
return FINISHED_DOWN;

View File

@ -346,6 +346,10 @@ public:
///
void cursorEnd(BufferView *) const;
///
void cursorPrevious(BufferView * bv);
///
void cursorNext(BufferView * bv);
///
void cursorTab(BufferView *) const;
///
void cursorTop(BufferView *) const;
@ -487,10 +491,6 @@ private:
///
void cursorLeftOneWord(LyXCursor &) const;
///
void cursorPrevious(BufferView * bv);
///
void cursorNext(BufferView * bv);
///
float getCursorX(BufferView *, Row *, lyx::pos_type pos,

View File

@ -26,7 +26,9 @@ string verboseHLine(int n)
string res;
for (int i = 0; i < n; ++i)
res += "\\hline";
return res + ' ';
if (n)
res += " ";
return res;
}
}