* src/Text.cpp (getPossibleLabel):

- remove line breaks from label proposals (fixes bug 4334)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@21488 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2007-11-07 15:26:06 +00:00
parent 1473b3f60d
commit c0a625149f
2 changed files with 7 additions and 0 deletions

View File

@ -90,6 +90,7 @@ using support::bformat;
using support::contains;
using support::lowercase;
using support::split;
using support::rsplit;
using support::uppercase;
using cap::cutSelection;
@ -1896,6 +1897,10 @@ docstring Text::getPossibleLabel(Cursor & cur) const
docstring text;
docstring par_text = pars_[pit].asString(cur.buffer(), false);
string piece;
// the return string of math matrices might contain linebreaks
// FIXME: unicode
par_text = from_utf8(rsplit(to_utf8(par_text), piece, '\n'));
for (int i = 0; i < lyxrc.label_init_length; ++i) {
if (par_text.empty())
break;

View File

@ -94,6 +94,8 @@ What's new
- Fix a crash when deleting a row or column of a math matrix while its
content is selected (bug 4323).
- Fix a crash when inserting a label after a math matrix (bug 4334).
- Fix a crash when overwriting a selection that spans multiple paragraphs
(bug 4317).