#include <config.h>
#include "lyxtext.h"
-#include "LString.h"
-#include "Lsstream.h"
-#include "paragraph.h"
+#include "support/std_sstream.h"
#include "funcrequest.h"
#include "frontends/LyXView.h"
#include "undo_funcs.h"
#include "buffer.h"
#include "buffer_funcs.h"
-#include "bufferparams.h"
-#include "errorlist.h"
#include "gettext.h"
#include "BufferView.h"
#include "CutAndPaste.h"
-#include "frontends/Painter.h"
#include "frontends/font_metrics.h"
#include "debug.h"
#include "lyxrc.h"
+#include "Floating.h"
#include "FloatList.h"
#include "language.h"
#include "ParagraphParameters.h"
#include <boost/tuple/tuple.hpp>
-#include <algorithm>
using namespace lyx::support;
void LyXText::cursorEnd()
{
- if (cursor.par()->empty())
- return;
-
- RowList::iterator rit = cursorRow();
- ParagraphList::iterator pit = cursor.par();
- pos_type pos = lastPos(*pit, rit);
- /* cursor should be before a hard newline only */
- if (!pit->isNewline(pos))
- ++pos;
- setCursor(pit, pos);
+ setCursor(cursor.par(), cursorRow()->end() - 1);
}
// y is now the cursor baseline
cur.y(y);
- pos_type last = lastPrintablePos(*pit, row);
+ pos_type last = lastPos(*pit, row);
// None of these should happen, but we're scaredy-cats
if (pos > pit->size()) {
double fill_label_hfill = rit->fill_label_hfill();
pos_type vc = rit->pos();
- pos_type last = lastPrintablePos(*pit, rit);
+ pos_type last = lastPos(*pit, rit);
pos_type c = 0;
LyXLayout_ptr const & layout = pit->layout();