text->copyEnvironmentType();
// clear the selection, even if mark_set
toggleSelection();
- text->clearSelection(this);
+ text->clearSelection();
update(text, BufferView::SELECT|BufferView::FITCUR);
owner()->message(_("Paragraph environment type copied"));
}
text->copySelection(this);
// clear the selection, even if mark_set
toggleSelection();
- text->clearSelection(this);
+ text->clearSelection();
update(text, BufferView::SELECT|BufferView::FITCUR);
owner()->message(_("Copy"));
}
hideCursor();
// clear the selection
toggleSelection();
- text->clearSelection(this);
+ text->clearSelection();
update(text, BufferView::SELECT|BufferView::FITCUR);
// paste
// clear the selection
toggleSelection();
- text->clearSelection(this);
+ text->clearSelection();
update(text, BufferView::SELECT|BufferView::FITCUR);
}
hideCursor();
beforeChange(text);
text->selectSelectedWord(this);
- text->clearSelection(this);
+ text->clearSelection();
update(text, BufferView::SELECT|BufferView::FITCUR);
}
bv_->text->setSelection(bv_);
screen_->toggleToggle(bv_->text, bv_);
fitCursor(bv_->text);
+#if 0
screen_->showCursor(bv_->text, bv_);
+#else
+ showCursor();
+#endif
}
// Clear the selection
screen_->toggleSelection(bv_->text, bv_);
- bv_->text->clearSelection(bv_);
+ bv_->text->clearSelection();
bv_->text->fullRebreak(bv_);
screen_->update(bv_->text, bv_);
updateScrollbar();
void BufferView::Pimpl::beforeChange(LyXText * text)
{
toggleSelection();
- text->clearSelection(bv_);
+ text->clearSelection();
}
}
} else if (bv_->theLockingInset()->updateInsetInInset(bv_, inset)) {
if (bv_->text->updateInset(bv_,
- bv_->theLockingInset())) {
+ bv_->theLockingInset())) {
update();
if (mark_dirty){
buffer_->markDirty();
+2001-08-01 Juergen Vigna <jug@sad.it>
+
+ * lyxfind.C (LyXFind): fixed
+ (SearchForward): ditto
+ (SearchBackward): ditto
+
+ * BufferView_pimpl.C (workAreaMotionNotify): hopefully fixed the
+ spurius drawing of the cursor in the main area.
+
+ * text2.C (status): small fix which could lead to a segfault!
+ (clearSelection): remove unneeded BufferView param.
+
2001-08-01 André Pönitz <poenitz@gmx.net>
* lyxfunc.C: small change due to changed mathed interface
+2001-08-01 Juergen Vigna <jug@sad.it>
+
+ * insetcollapsable.C (update): added an in_update bool so we avoid
+ reentering.
+
+ * insettabular.C (update): added an in_update bool so we avoid
+ reentering.
+
+ * insettext.C (insetButtonPress): hopefully fixed setselection/clear
+ selection problem.
+ (update): added an in_update bool so we avoid reentering.
+
+ * insettabular.C (localDispatch): clear col/row selection when doing
+ something else inside an inset.
+
+ * insettext.C (getLyXText): fixed bug when requesting a recursive
+ insettext!
+
2001-08-01 Angus Leeming <a.leeming@ic.ac.uk>
* insetcite.C (latex): Paranoia check. Make sure that there is no
2001-07-31 Juergen Vigna <jug@sad.it>
+ * inset.h (nodraw): make the set function also const so that this
+ can be called from inside other const functions.
+
* insetcollapsable.h: removed inline variable and moved it over
to the only user InsetERT.
id_ = id_arg;
}
+void Inset::setFont(BufferView *, LyXFont const &, bool, bool )
+{}
+
// some stuff for inset locking
UpdatableInset::UpdatableInset()
}
-void UpdatableInset::setFont(BufferView *, LyXFont const &, bool, bool )
-{}
-
-
void UpdatableInset::scroll(BufferView * bv, float s) const
{
LyXFont font;
/// check if the font of the char we want inserting is correct
/// and modify it if it is not.
virtual bool checkInsertChar(LyXFont &);
+ /// we need this here because collapsed insets are only EDITABLE
+ virtual void setFont(BufferView *, LyXFont const &,
+ bool toggleall = false, bool selectall = false);
protected:
///
mutable int top_x;
virtual void draw(BufferView *, LyXFont const &,
int baseline, float & x, bool cleared) const;
///
- virtual void setFont(BufferView *, LyXFont const &,
- bool toggleall = false, bool selectall = false);
- ///
virtual bool insertInset(BufferView *, Inset *) { return false; }
///
virtual UpdatableInset * getLockingInset() const {
///
virtual bool showInsetDialog(BufferView *) const { return false; }
///
- virtual void nodraw(bool b) {
+ virtual void nodraw(bool b) const {
block_drawing_ = b;
}
///
///
mutable bool cursor_visible_;
///
- bool block_drawing_;
+ mutable bool block_drawing_;
};
#endif
InsetCollapsable::InsetCollapsable(bool collapsed)
: UpdatableInset(), collapsed_(collapsed),
button_length(0), button_top_y(0), button_bottom_y(0),
- need_update(FULL), label("Label"),
+ need_update(NONE), label("Label"),
#if 0
autocollapse(false),
#endif
- oldWidth(0)
+ oldWidth(0), in_update(false)
{
inset.setOwner(this);
inset.setAutoBreakRows(true);
: UpdatableInset(in, same_id), collapsed_(in.collapsed_),
framecolor(in.framecolor), labelfont(in.labelfont),
button_length(0), button_top_y(0), button_bottom_y(0),
- need_update(FULL), label(in.label),
+ need_update(NONE), label(in.label),
#if 0
autocollapse(in.autocollapse),
#endif
- oldWidth(0)
+ oldWidth(0), in_update(false)
{
inset.init(&(in.inset), same_id);
inset.setOwner(this);
void InsetCollapsable::draw(BufferView * bv, LyXFont const & f,
int baseline, float & x, bool cleared) const
{
+ if (need_update != NONE) {
+ const_cast<InsetText *>(&inset)->update(bv, f, true);
+ bv->text->status(bv, LyXText::CHANGED_IN_DRAW);
+ need_update = NONE;
+ return;
+ }
if (nodraw())
return;
inset.draw(bv, f,
bl + descent_collapsed() + inset.ascent(bv, f),
x, cleared);
- need_update = NONE;
}
void InsetCollapsable::update(BufferView * bv, LyXFont const & font,
- bool reinit)
+ bool reinit)
{
+ if (in_update)
+ return;
+ in_update = true;
inset.update(bv, font, reinit);
+ if (reinit && owner()) {
+ owner()->update(bv, font, true);
+ }
+ in_update = false;
}
#endif
///
mutable int oldWidth;
+ ///
+ bool in_update;
};
#endif
void InsetMinipage::pos(InsetMinipage::Position p)
{
- pos_ = p;
+ if (pos_ != p) {
+ pos_ = p;
+ need_update = FULL;
+ }
}
void InsetMinipage::height(string const & ll)
{
- height_ = ll;
+ if (height_ != ll) {
+ height_ = ll;
+ need_update = FULL;
+ }
}
void InsetMinipage::width(string const & ll)
{
- width_ = ll;
+ if (ll != width_) {
+ width_ = ll;
+ need_update = FULL;
+ }
}
actrow = actcell = 0;
clearSelection();
need_update = INIT;
+ in_update = false;
}
actrow = actcell = 0;
sel_cell_start = sel_cell_end = 0;
need_update = INIT;
+ in_update = false;
}
void InsetTabular::update(BufferView * bv, LyXFont const & font, bool reinit)
{
+ if (in_update)
+ return;
+ in_update = true;
if (reinit) {
need_update = INIT;
calculate_dimensions_of_cells(bv, font, true);
if (owner())
owner()->update(bv, font, true);
+ in_update = false;
return;
}
if (the_locking_inset)
default:
break;
}
+ in_update = false;
}
UpdatableInset::RESULT
-InsetTabular::localDispatch(BufferView * bv,
- kb_action action,
- string const & arg)
+InsetTabular::localDispatch(BufferView * bv, kb_action action,
+ string const & arg)
{
// We need to save the value of the_locking_inset as the call to
// the_locking_inset->LocalDispatch might unlock it.
bool hs = hasSelection();
result = DISPATCHED;
- // this one have priority over the locked InsetText!
- switch (action) {
- case LFUN_SHIFT_TAB:
- case LFUN_TAB:
- {
- if (getFirstLockingInsetOfType(Inset::TABULAR_CODE) != this)
+ // this one have priority over the locked InsetText, if we're not already
+ // inside another tabular then that one get's priority!
+ if (getFirstLockingInsetOfType(Inset::TABULAR_CODE) == this) {
+ switch (action) {
+ case LFUN_SHIFT_TAB:
+ case LFUN_TAB:
+ hideInsetCursor(bv);
+ if (the_locking_inset) {
+ unlockInsetInInset(bv, the_locking_inset);
+ the_locking_inset = 0;
+ }
+ if (action == LFUN_TAB)
+ moveNextCell(bv, old_locking_inset != 0);
+ else
+ movePrevCell(bv, old_locking_inset != 0);
+ sel_cell_start = sel_cell_end = actcell;
+ if (hs)
+ updateLocal(bv, SELECTION, false);
+ if (!the_locking_inset) {
+ showInsetCursor(bv);
+ return DISPATCHED_NOUPDATE;
+ }
+ return result;
+ // this to avoid compiler warnings.
+ default:
break;
- hideInsetCursor(bv);
- if (the_locking_inset) {
- unlockInsetInInset(bv, the_locking_inset);
- the_locking_inset = 0;
- }
- if (action == LFUN_TAB)
- moveNextCell(bv, old_locking_inset != 0);
- else
- movePrevCell(bv, old_locking_inset != 0);
- sel_cell_start = sel_cell_end = actcell;
- if (hs)
- updateLocal(bv, SELECTION, false);
- if (!the_locking_inset) {
- showInsetCursor(bv);
- return DISPATCHED_NOUPDATE;
}
- return result;
- }
- // this to avoid compiler warnings.
- default:
- break;
}
if (the_locking_inset) {
updateLocal(bv, CELL, false);
the_locking_inset->toggleInsetCursor(bv);
return result;
- } else if (result == FINISHED) {
}
}
// we need to update if this was requested before
updateLocal(bv, NONE, false);
return UNDISPATCHED;
+ } else if (hs) {
+ clearSelection();
}
nodraw(false);
-// the_locking_inset->ToggleInsetCursor(bv);
updateLocal(bv, CELL, false);
-// the_locking_inset->ToggleInsetCursor(bv);
return result;
}
break;
bv->hideLockedInsetCursor();
setCursorVisible(false);
}
-// if (cursor_visible)
-// ToggleInsetCursor(bv);
+}
+
+
+void InsetTabular::fitInsetCursor(BufferView * bv) const
+{
+ if (the_locking_inset) {
+ the_locking_inset->fitInsetCursor(bv);
+ return;
+ }
+ LyXFont font;
+
+ int const asc = lyxfont::maxAscent(font);
+ int const desc = lyxfont::maxDescent(font);
+ bv->fitLockedInsetCursor(cursor_.x(), cursor_.y(), asc, desc);
}
}
++actcell;
}
-
+ nodraw(true);
// otherwise we have to lock the next inset and ask for it's selecttion
UpdatableInset * inset =
static_cast<UpdatableInset*>(tabular->GetCellInset(actcell));
inset->edit(bv, 0, 0, 0);
string const str(selectNextWordInt(bv, value));
+ nodraw(false);
if (!str.empty())
resetPos(bv);
return str;
bool InsetTabular::searchForward(BufferView * bv, string const & str,
- bool const & cs, bool const & mw)
+ bool const & cs, bool const & mw)
{
if (the_locking_inset) {
if (the_locking_inset->searchForward(bv, str, cs, mw))
}
++actcell;
}
- nodraw(true);
// otherwise we have to lock the next inset and search there
UpdatableInset * inset =
static_cast<UpdatableInset*>(tabular->GetCellInset(actcell));
inset->edit(bv);
+#if 0
bool const res = searchForward(bv, str, cs, mw);
updateLocal(bv, NONE, false);
- nodraw(false);
bv->updateInset(const_cast<InsetTabular *>(this), false);
return res;
+#else
+ return searchForward(bv, str, cs, mw);
+#endif
}
}
--actcell;
}
- nodraw(true);
// otherwise we have to lock the next inset and search there
UpdatableInset * inset =
static_cast<UpdatableInset*>(tabular->GetCellInset(actcell));
inset->edit(bv, false);
+#if 0
bool const res = searchBackward(bv, str, cs, mw);
- nodraw(false);
bv->updateInset(const_cast<InsetTabular *>(this), false);
return res;
+#else
+ return searchBackward(bv, str, cs, mw);
+#endif
}
///
std::vector<string> const getLabelList() const;
///
- void nodraw(bool b) {
+ void nodraw(bool b) const {
UpdatableInset::nodraw(b);
}
bool nodraw() const;
///
void hideInsetCursor(BufferView *);
///
+ void fitInsetCursor(BufferView *) const;
+ ///
void setPos(BufferView *, int x, int y) const;
///
UpdatableInset::RESULT moveRight(BufferView *, bool lock = true);
mutable bool locked;
///
mutable UpdateCodes need_update;
+ ///
+ bool in_update;
};
#endif
{
par = new Paragraph;
init();
+ in_update = false;
}
{
par = 0;
init(&ins, same_id);
+ in_update = false;
autoBreakRows = ins.autoBreakRows;
}
} else if (!locked) {
if (need_update & CURSOR) {
bv->screen()->toggleSelection(lt, bv, true, y_offset,int(x));
- lt->clearSelection(bv);
+ lt->clearSelection();
lt->selection.cursor = lt->cursor;
}
bv->screen()->update(lt, bv, y_offset, int(x));
bv->screen()->toggleToggle(lt, bv, y_offset, int(x));
else if (need_update & CURSOR) {
bv->screen()->toggleSelection(lt, bv, true, y_offset,int(x));
- lt->clearSelection(bv);
+ lt->clearSelection();
lt->selection.cursor = lt->cursor;
}
bv->screen()->update(lt, bv, y_offset, int(x));
void InsetText::update(BufferView * bv, LyXFont const & font, bool reinit)
{
+ if (in_update)
+ return;
+ in_update = true;
if (reinit) {
need_update |= INIT;
resizeLyXText(bv);
if (owner())
owner()->update(bv, font, true);
+ in_update = false;
return;
}
if (the_locking_inset) {
need_update |= FULL;
if (clear)
lt = 0;
+ in_update = false;
return;
}
if ((need_update & CURSOR_PAR) && (lt->status() == LyXText::UNCHANGED) &&
need_update |= FULL;
if (clear)
lt = 0;
+ in_update = false;
}
need_update |= CURSOR_PAR;
// this to not draw a selection when we redraw all of it!
- if ((need_update & (INIT|FULL)) && (need_update & CURSOR))
- lt->clearSelection(bv);
+ if (need_update & CURSOR) {
+ if (lt->selection.set())
+ need_update = FULL;
+ lt->clearSelection();
+ }
if (clear)
lt = 0;
}
if (!checkAndActivateInset(bv, x, tmp_y, button))
lt->setCursorFromCoordinates(bv, x - drawTextXOffset,
y + insetAscent);
- lt->clearSelection(bv);
+ lt->clearSelection();
finishUndo();
showInsetCursor(bv);
updateLocal(bv, CURSOR, false);
p = p->next();
lt->setCursor(bv, p, p->size()-1);
}
- lt->clearSelection(bv);
+ lt->clearSelection();
finishUndo();
showInsetCursor(bv);
updateLocal(bv, CURSOR, false);
clear = true;
}
if (lt->selection.set()) {
- lt->clearSelection(bv);
+ lt->clearSelection();
code = FULL;
} else if (owner()) {
bv->owner()->setLayout(owner()->getLyXText(bv)
}
getLyXText(bv)->setCursorFromCoordinates(bv, x-drawTextXOffset,
y + insetAscent);
+ getLyXText(bv)->clearSelection();
+ updateLocal(bv, FULL, false);
getLyXText(bv)->selection.cursor = getLyXText(bv)->cursor;
- updateLocal(bv, CURSOR, false);
bv->owner()->setLayout(cpar(bv)->getLayout());
old_par = cpar(bv);
// Insert primary selection with middle mouse
lt->cutSelection(bv, false);
}
}
- lt->clearSelection(bv);
+ lt->clearSelection();
for (string::size_type i = 0; i < arg.length(); ++i) {
if (greek_kb_flag) {
if (!math_insert_greek(bv, arg[i])) {
clear = true;
}
lt->insertInset(bv, inset);
+#if 0
if ((cpar(bv)->getChar(cpos(bv)) != Paragraph::META_INSET) ||
(cpar(bv)->getInset(cpos(bv)) != inset))
lt->cursorLeft(bv);
+#endif
bv->fitCursor(lt);
updateLocal(bv, CURSOR_PAR|CURSOR, true);
showInsetCursor(bv);
lt->setFont(bv, font, toggleall);
#endif
if (selectall)
- lt->clearSelection(bv);
+ lt->clearSelection();
bv->fitCursor(lt);
if (selectall || lt->selection.set())
updateLocal(bv, FULL, true);
lyx::Assert(it->second.text.get());
cached_text = it->second.text;
if (recursive && the_locking_inset) {
- return the_locking_inset->getLyXText(bv);
+ return the_locking_inset->getLyXText(bv, true);
}
return cached_text.get();
} else if (it->second.remove) {
void InsetText::clearSelection(BufferView * bv)
{
- getLyXText(bv)->clearSelection(bv);
+ getLyXText(bv)->clearSelection();
}
bool InsetText::searchForward(BufferView * bv, string const & str,
bool const & cs, bool const & mw)
{
- if (the_locking_inset)
+ if (the_locking_inset) {
if (the_locking_inset->searchForward(bv, str, cs, mw))
return true;
+ bool clear = false;
+ if (!lt) {
+ lt = getLyXText(bv);
+ clear = true;
+ }
+ Paragraph * lpar = lt->cursor.par();
+ Paragraph::size_type pos = lt->cursor.pos();
+ if (pos < lpar->size() - 1)
+ ++pos;
+ else {
+ pos = 0;
+ lpar = lpar->next();
+ }
+ if (!lpar) {
+ if (clear)
+ lt = 0;
+ return false;
+ }
+ lt->setCursor(bv, lpar, pos);
+ if (clear)
+ lt = 0;
+ }
if (LyXFind(bv, str, true, true, cs , mw)) {
return true;
}
mutable int frame_y;
mutable int frame_w;
mutable int frame_h;
+ ///
+ bool in_update; /* as update is not reentrant! */
};
#endif
// start at top if replaceall
bool fw = forward;
if (replaceall) {
- text->clearSelection(bv);
+ text->clearSelection();
if (text->inset_owner) {
bv->unlockInset(bv->theLockingInset());
text = bv->text;
}
}
- bool found;
+ bool found = false;
int replace_count = 0;
do {
bv->hideCursor();
bv->theLockingInset()->searchBackward(bv, searchstr, casesens, matchwrd);
if (found)
result = SR_FOUND_NOUPDATE;
+ else {
+ text = bv->getLyXText();
+ Paragraph * par = text->cursor.par();
+ Paragraph::size_type pos = text->cursor.pos();
+ if (forward) {
+ if (pos < par->size() - 1)
+ ++pos;
+ else {
+ pos = 0;
+ par = par->next();
+ }
+ if (par)
+ text->setCursor(bv, par, pos);
+ }
+ if (par) {
+ result = forward ?
+ SearchForward(bv, text, searchstr, casesens, matchwrd) :
+ SearchBackward(bv, text, searchstr, casesens, matchwrd);
+ }
+ }
} else {
result = forward ?
SearchForward(bv, text, searchstr, casesens, matchwrd) :
// the actual text pointer could have changed!
bv->update(bv->getLyXText(), BufferView::SELECT|BufferView::FITCUR);
bv->toggleSelection();
- bv->getLyXText()->clearSelection(bv);
+ bv->getLyXText()->clearSelection();
bv->getLyXText()->setSelectionOverString(bv, searchstr);
bv->toggleSelection(false);
bv->update(bv->getLyXText(), BufferView::SELECT|BufferView::FITCUR);
// test if we're inside an inset if yes unlock the inset
// and recall us with the outside LyXText!
bv->unlockInset((UpdatableInset *)text->inset_owner);
- text = bv->getLyXText();
- par = text->cursor.par();
- pos = text->cursor.pos();
- if (pos < par->size() - 1)
- ++pos;
- else {
- pos = 0;
- par = par->next();
- }
- if (!par)
+ if (!bv->theLockingInset()) {
+ text = bv->getLyXText();
+ par = text->cursor.par();
+ pos = text->cursor.pos();
+ if (pos < par->size() - 1)
+ ++pos;
+ else {
+ pos = 0;
+ par = par->next();
+ }
+ if (!par)
+ return SR_NOT_FOUND;
+ text->setCursor(bv, par, pos);
+ return SearchForward(bv, text, str, cs, mw);
+ } else {
return SR_NOT_FOUND;
- text->setCursor(bv, par, pos);
- return SearchForward(bv, text, str, cs, mw);
+ }
} else
return SR_NOT_FOUND;
}
// test if we're inside an inset if yes unlock the inset
// and recall us with the outside LyXText!
bv->unlockInset((UpdatableInset *)text->inset_owner);
- return SearchBackward(bv, bv->getLyXText(), str, cs, mw);
- } else {
- return SR_NOT_FOUND;
+ if (!bv->theLockingInset()) {
+ return SearchBackward(bv, bv->getLyXText(), str, cs, mw);
+ }
}
+ return SR_NOT_FOUND;
}
/// need the selection cursor:
void setSelection(BufferView *);
///
- void clearSelection(BufferView *) const;
+ void clearSelection() const;
///
string const selectionAsString(Buffer const *) const;
// Just a macro to make some thing easier.
void LyXText::redoParagraph(BufferView * bview) const
{
- clearSelection(bview);
+ clearSelection();
redoParagraphs(bview, cursor, cursor.par()->next());
setCursorIntern(bview, cursor.par(), cursor.pos());
}
if (par->getChar(pos) == Paragraph::META_INSET) {
Inset * inset = par->getInset(pos);
if (inset) {
- if (inset->editable()==Inset::HIGHLY_EDITABLE) {
+ if (inset->editable()==Inset::IS_EDITABLE) {
UpdatableInset * uinset =
static_cast<UpdatableInset *>(inset);
uinset->setFont(bv, fnt, toggleall, true);
selection.cursor = cursor;
setCursor(bview, selection.end.par(), selection.end.pos(), false);
updateCounters(bview, cursor.row());
- clearSelection(bview);
+ clearSelection();
setSelection(bview);
setCursor(bview, tmpcursor.par(), tmpcursor.pos(), true);
}
selection.cursor = cursor;
setCursor(bview, selection.end.par(), selection.end.pos());
updateCounters(bview, cursor.row());
- clearSelection(bview);
+ clearSelection();
setSelection(bview);
setCursor(bview, tmpcursor.par(), tmpcursor.pos());
}
selection.cursor = cursor;
setCursor(bview, selection.end.par(), selection.end.pos());
updateCounters(bview, cursor.row());
- clearSelection(bview);
+ clearSelection();
setSelection(bview);
setCursor(bview, tmpcursor.par(), tmpcursor.pos());
}
setCursor(bview, selection.start.par(), selection.start.pos());
selection.cursor = cursor;
setCursor(bview, selection.end.par(), selection.end.pos());
- clearSelection(bview);
+ clearSelection();
setSelection(bview);
setCursor(bview, tmpcursor.par(), tmpcursor.pos(), true,
tmpcursor.boundary());
}
-void LyXText::clearSelection(BufferView * /*bview*/) const
+void LyXText::clearSelection() const
{
selection.set(false);
selection.mark(false);
// Implicit selections are cleared afterwards
//and cursor is set to the original position.
if (implicitSelection) {
- clearSelection(bview);
+ clearSelection();
cursor = resetCursor;
setCursor(bview, cursor.par(), cursor.pos());
selection.cursor = cursor;
// Implicit selections are cleared afterwards
//and cursor is set to the original position.
if (implicitSelection) {
- clearSelection(bview);
+ clearSelection();
cursor = resetCursor;
setCursor(bview, cursor.par(), cursor.pos());
selection.cursor = cursor;
redoParagraphs(bview, selection.start, endpar);
- clearSelection(bview);
+ clearSelection();
setCursor(bview, selection.start.par(), selection.start.pos());
selection.cursor = cursor;
setCursor(bview, selection.end.par(), selection.end.pos());
cursor = selection.start;
// need a valid cursor. (Lgb)
- clearSelection(bview);
+ clearSelection();
setCursor(bview, cursor.par(), cursor.pos());
selection.cursor = cursor;
redoParagraphs(bview, cursor, endpar);
setCursor(bview, cursor.par(), cursor.pos());
- clearSelection(bview);
+ clearSelection();
selection.cursor = cursor;
setCursor(bview, actpar, pos);
setCursorParUndo(bview);
// only to be sure, should not be neccessary
- clearSelection(bview);
+ clearSelection();
bview->buffer()->insertStringAsLines(par, pos, current_font, str);
status_ = st;
if (inset_owner && st != UNCHANGED) {
bview->text->status(bview, NEED_VERY_LITTLE_REFRESH);
+ if (!bview->text->refresh_row) {
+ bview->text->refresh_row = bview->text->cursor.row();
+ bview->text->refresh_y = bview->text->cursor.y() -
+ bview->text->cursor.row()->baseline();
+ }
}
}
#endif