mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
bug 1376 partial fix and simplification.
End will still place the cursor on the next row visually if there's another row after the current one in the par. This is a general problem, dunno why it's doing it now. .ix() breakage possibly git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7638 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
edb3ec204d
commit
c96136c040
@ -1,3 +1,8 @@
|
||||
2003-09-02 John Levon <levon@movementarian.org>
|
||||
|
||||
* text2.C: simplification of cursorEnd(), including partial
|
||||
fix for bug 1376
|
||||
|
||||
2003-09-02 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* buffer.C (readFile): add a space
|
||||
|
19
src/text2.C
19
src/text2.C
@ -675,21 +675,12 @@ void LyXText::cursorEnd()
|
||||
return;
|
||||
|
||||
RowList::iterator rit = cursorRow();
|
||||
RowList::iterator next_rit = boost::next(rit);
|
||||
RowList::iterator end = boost::next(rit);
|
||||
ParagraphList::iterator pit = cursor.par();
|
||||
pos_type last_pos = lastPos(*pit, rit);
|
||||
|
||||
if (next_rit == end) {
|
||||
++last_pos;
|
||||
} else {
|
||||
if (pit->empty() ||
|
||||
(pit->getChar(last_pos) != ' ' && !pit->isNewline(last_pos))) {
|
||||
++last_pos;
|
||||
}
|
||||
}
|
||||
|
||||
setCursor(pit, last_pos);
|
||||
pos_type pos = lastPos(*pit, rit);
|
||||
/* cursor should be before a hard newline only */
|
||||
if (!pit->isNewline(pos))
|
||||
++pos;
|
||||
setCursor(pit, pos);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user