// Clear the selection
screen_->ToggleSelection(bv_->text, bv_);
- bv_->text->ClearSelection();
+ bv_->text->ClearSelection(bv_);
bv_->text->FullRebreak(bv_);
screen_->Update(bv_->text, bv_);
updateScrollbar();
return;
if (screen_ && button == 1) {
- screen_->HideCursor();
- screen_->ToggleSelection(text, bv_);
- text->SelectWord(bv_);
- screen_->ToggleSelection(text, bv_, false);
+ if (text->bv_owner) {
+ screen_->HideCursor();
+ screen_->ToggleSelection(text, bv_);
+ text->SelectWord(bv_);
+ screen_->ToggleSelection(text, bv_, false);
+ } else {
+ text->SelectWord(bv_);
+ }
/* This will fit the cursor on the screen
* if necessary */
update(text, BufferView::SELECT|BufferView::FITCUR);
text->FullRebreak(bv_);
if (text->inset_owner) {
- text->inset_owner->SetUpdateStatus(bv_, InsetText::CURSOR_PAR);
+// text->inset_owner->SetUpdateStatus(bv_, InsetText::CURSOR_PAR);
bv_->updateInset(text->inset_owner, true);
} else
update();
void BufferView::Pimpl::beforeChange(LyXText * text)
{
toggleSelection();
- text->ClearSelection();
+ text->ClearSelection(bv_);
}