commit 39492b0cd78ab1f9517c556b36236066e86b18ba
Author: Enrico Forestieri <for...@lyx.org>
Date:   Wed Aug 6 02:21:18 2014 +0200

    Do not allow copying a separator without a following par end.
    
    This makes virtually impossible copying a separator inset whithout
    also copying the end of paragraph. These insets are not supposed to
    be directly inserted by users. For example, the parbreak version
    represents a LaTeX paragraph break, not a LyX one. So, if it is
    possible to copy and paste it by alone, an unsespecting user may be
    surprised to see a paragraph break in the output but not on the LyX
    screen (because of the lack of indentation, for example).
    In this way, it also becomes a LyX par break from a user point of
    view, not any more useful than simply introducing a par break by
    hitting <return> (except in those cases where it makes a difference,
    in which case they are automatically inserted by LyX).

diff --git a/src/Row.cpp b/src/Row.cpp
index 023286e..aeede91 100644
--- a/src/Row.cpp
+++ b/src/Row.cpp
@@ -47,7 +47,7 @@ double Row::Element::pos2x(pos_type const i) const
 
        double w = 0;
        //handle first the two bounds of the element
-       if (i == endpos)
+       if (i == endpos && !(inset && inset->lyxCode() == SEPARATOR_CODE))
                w = rtl ? 0 : width();
        else if (i == pos || type != STRING)
                w = rtl ? width() : 0;

Reply via email to