From 2c613d5686e0a391a92e8e2c4a93b784e2e891e5 Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Thu, 22 May 2014 11:41:23 +0200 Subject: [PATCH] Fix potential crash. Use the lfun for breaking the paragraph here, such that the metrics are updated before the call to the next dispatch. --- src/Text3.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Text3.cpp b/src/Text3.cpp index 2c2cba4729..9fc8d6f8cc 100644 --- a/src/Text3.cpp +++ b/src/Text3.cpp @@ -1084,7 +1084,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd) DocumentClass const & tc = bv->buffer().params().documentClass(); lyx::dispatch(FuncRequest(LFUN_LAYOUT, tc.plainLayout().name())); lyx::dispatch(FuncRequest(LFUN_SEPARATOR_INSERT, "parbreak")); - breakParagraph(cur, true); + lyx::dispatch(FuncRequest(LFUN_PARAGRAPH_BREAK, "inverse")); lyx::dispatch(FuncRequest(LFUN_LAYOUT, layout)); } else { lyx::dispatch(FuncRequest(LFUN_SEPARATOR_INSERT, "parbreak")); -- 2.39.5