mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 10:18:50 +00:00
fix bug 2010 (boundary effects at the end of text insets)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10445 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
fd69d1cfe9
commit
6572d0d661
@ -1,3 +1,8 @@
|
|||||||
|
2005-09-13 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
|
||||||
|
|
||||||
|
* text2.C (cursorEnd, cursorRight): do not set boundary to true at
|
||||||
|
end of paragraph. (bug 2010)
|
||||||
|
|
||||||
2005-09-10 Georg Baum <Georg.Baum@post.rwth-aachen.de>
|
2005-09-10 Georg Baum <Georg.Baum@post.rwth-aachen.de>
|
||||||
|
|
||||||
* text.C (leftMargin): check for inInset == 0
|
* text.C (leftMargin): check for inInset == 0
|
||||||
|
12
src/text2.C
12
src/text2.C
@ -498,12 +498,13 @@ void LyXText::cursorEnd(LCursor & cur)
|
|||||||
// empty text, end-1 is no valid position
|
// empty text, end-1 is no valid position
|
||||||
return;
|
return;
|
||||||
bool boundary = false;
|
bool boundary = false;
|
||||||
if (!cur.paragraph().isLineSeparator(end-1) &&
|
if (end != cur.lastpos()) {
|
||||||
!cur.paragraph().isNewline(end-1))
|
if (!cur.paragraph().isLineSeparator(end-1)
|
||||||
{
|
&& !cur.paragraph().isNewline(end-1))
|
||||||
boundary = true;
|
boundary = true;
|
||||||
} else if (end != cur.lastpos())
|
else
|
||||||
--end;
|
--end;
|
||||||
|
}
|
||||||
setCursor(cur, cur.pit(), end, true, boundary);
|
setCursor(cur, cur.pit(), end, true, boundary);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1020,7 +1021,8 @@ bool LyXText::cursorRight(LCursor & cur)
|
|||||||
if (cur.pos() != cur.lastpos()) {
|
if (cur.pos() != cur.lastpos()) {
|
||||||
bool updateNeeded = false;
|
bool updateNeeded = false;
|
||||||
if (!checkAndActivateInset(cur, true)) {
|
if (!checkAndActivateInset(cur, true)) {
|
||||||
if (cur.textRow().endpos() == (cur.pos() + 1) &&
|
if (cur.textRow().endpos() == cur.pos() + 1 &&
|
||||||
|
cur.textRow().endpos() != cur.lastpos() &&
|
||||||
!cur.paragraph().isLineSeparator(cur.pos()) &&
|
!cur.paragraph().isLineSeparator(cur.pos()) &&
|
||||||
!cur.paragraph().isNewline(cur.pos()))
|
!cur.paragraph().isNewline(cur.pos()))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user