mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Fix bug #7905. We don't want to move out of the inset unless
we've put something into it. (We also don't need to copy an empty string into it.) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40240 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
c58290e5f1
commit
d38d332d9f
@ -247,8 +247,11 @@ static bool doInsertInset(Cursor & cur, Text * text,
|
||||
inset->edit(cur, true);
|
||||
// Now put this into inset
|
||||
Font const f(inherit_font, cur.current_font.language());
|
||||
cur.text()->insertStringAsLines(cur, ds, f);
|
||||
cur.leaveInset(*inset);
|
||||
if (!ds.empty()) {
|
||||
cur.text()->insertStringAsLines(cur, ds, f);
|
||||
cur.leaveInset(*inset);
|
||||
inset->asInsetCollapsable()->setStatus(InsetCollapsable::Collapsed);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user