diff --git a/src/insets/insettabular.C b/src/insets/insettabular.C index 1bdec8e659..c096b09923 100644 --- a/src/insets/insettabular.C +++ b/src/insets/insettabular.C @@ -501,7 +501,6 @@ void InsetTabular::doDispatch(LCursor & cur, FuncRequest & cmd) if (sl == cur.top()) { cmd = FuncRequest(LFUN_FINISHED_RIGHT); cur.undispatched(); - resetPos(cur); } break; @@ -514,7 +513,6 @@ void InsetTabular::doDispatch(LCursor & cur, FuncRequest & cmd) if (sl == cur.top()) { cmd = FuncRequest(LFUN_FINISHED_LEFT); cur.undispatched(); - resetPos(cur); } break; @@ -527,12 +525,10 @@ void InsetTabular::doDispatch(LCursor & cur, FuncRequest & cmd) cur.idx() = tabular.getCellBelow(cur.idx()); cur.pit() = 0; cur.pos() = 0; - resetPos(cur); } if (sl == cur.top()) { cmd = FuncRequest(LFUN_FINISHED_DOWN); cur.undispatched(); - resetPos(cur); } break; @@ -545,12 +541,10 @@ void InsetTabular::doDispatch(LCursor & cur, FuncRequest & cmd) cur.idx() = tabular.getCellAbove(cur.idx()); cur.pit() = cur.lastpit(); cur.pos() = cur.lastpos(); - resetPos(cur); } if (sl == cur.top()) { cmd = FuncRequest(LFUN_FINISHED_UP); cur.undispatched(); - resetPos(cur); } break; @@ -567,7 +561,6 @@ void InsetTabular::doDispatch(LCursor & cur, FuncRequest & cmd) // } // cur.par() = 0; // cur.pos() = 0; -// resetPos(cur); // break; // } // @@ -587,7 +580,6 @@ void InsetTabular::doDispatch(LCursor & cur, FuncRequest & cmd) // } // cur.par() = cur.lastpar(); // cur.pos() = cur.lastpos(); -// resetPos(cur); // break; // } @@ -772,10 +764,10 @@ void InsetTabular::doDispatch(LCursor & cur, FuncRequest & cmd) default: // we try to handle this event in the insets dispatch function. cell(cur.idx())->dispatch(cur, cmd); - resetPos(cur); break; } + resetPos(cur); InsetTabularMailer(*this).updateDialog(&cur.bv()); } diff --git a/src/insets/insettext.C b/src/insets/insettext.C index 97cb709699..cf1b64320f 100644 --- a/src/insets/insettext.C +++ b/src/insets/insettext.C @@ -190,16 +190,19 @@ void InsetText::draw(PainterInfo & pi, int x, int y) const // update our idea of where we are setPosCache(pi, x, y); - //BufferView * bv = pi.base.bv; - ////bv->hideCursor(); - text_.draw(pi, x + border_, y); if (drawFrame_) { int const w = text_.width() + 2 * border_; int const a = text_.ascent() + border_; int const h = a + text_.descent() + border_; - pi.pain.rectangle(x, y - a, w, h, frameColor()); + int const ww = pi.base.bv->workWidth(); + if (w > ww - 40) { + pi.pain.line(0, y - a, ww, y - a, frameColor()); + pi.pain.line(0, y - a + h, ww, y - a + h, frameColor()); + } else { + pi.pain.rectangle(x, y - a, w, h, frameColor()); + } } } diff --git a/src/tabular.C b/src/tabular.C index bde0dc4f78..c0c2e9a8a0 100644 --- a/src/tabular.C +++ b/src/tabular.C @@ -800,7 +800,7 @@ void LyXTabular::recalculateMulticolumnsOfColumn(col_type column) // always will have the whole rest of the width of the cell. if (column > (columns_ - 2)) return; - for(row_type row = 0; row < rows_; ++row) { + for (row_type row = 0; row < rows_; ++row) { int mc = cell_info[row][column].multicolumn; int nmc = cell_info[row][column+1].multicolumn; // we only have to update multicolumns which do not have this