From 77c1dbe3ba2b2ae5e628a228b95ec94b29c70b8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Sat, 10 Nov 2007 10:48:13 +0000 Subject: [PATCH] * src/Text.cpp: - safer (but slightly less nice) fix for bug 4334. Fixes bug 4347 that was introduced in r21488. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@21540 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Text.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Text.cpp b/src/Text.cpp index dffc4d6257..82f154b331 100644 --- a/src/Text.cpp +++ b/src/Text.cpp @@ -90,7 +90,7 @@ using support::bformat; using support::contains; using support::lowercase; using support::split; -using support::rsplit; +using support::subst; using support::uppercase; using cap::cutSelection; @@ -1899,8 +1899,7 @@ docstring Text::getPossibleLabel(Cursor & cur) const 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')); + par_text = subst(par_text, '\n', '-'); for (int i = 0; i < lyxrc.label_init_length; ++i) { if (par_text.empty()) break;