]> git.lyx.org Git - features.git/blobdiff - src/BufferView.cpp
Keep caret visible when small
[features.git] / src / BufferView.cpp
index 4289e313bffc5e85c0d175cce9eab50b600a8cf2..f9bbe234c66c7d77829cd5b49277ef6cff439a56 100644 (file)
@@ -2264,6 +2264,13 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
        }
 
        case LFUN_COPY:
+               // With multi-cell table content, we pass down to the inset
+               if (cur.inTexted() && cur.selection()
+                   && cur.selectionBegin().idx() != cur.selectionEnd().idx()) {
+                       buffer_.dispatch(cmd, dr);
+                       dispatched = dr.dispatched();
+                       break;
+               }
                cap::copySelection(cur);
                cur.message(_("Copy"));
                break;
@@ -3152,7 +3159,7 @@ void BufferView::caretPosAndDim(Point & p, Dimension & dim) const
        } else {
                Font const font = cur.real_current_font;
                frontend::FontMetrics const & fm = theFontMetrics(font);
-               dim.wid = fm.lineWidth();
+               dim.wid = max(fm.lineWidth(), 1);
                dim.asc = fm.maxAscent();
                dim.des = fm.maxDescent();
        }