{
// select a word
if (!buffer_)
- return;
+ return;
LyXText * text = bv_->getLyXText();
if (text->bv_owner && bv_->theLockingInset())
- return;
+ return;
if (screen_.get() && button == 1) {
- if (text->bv_owner) {
- screen_->hideCursor();
- screen_->toggleSelection(text, bv_);
- text->selectWord(bv_, LyXText::WHOLE_WORD_STRICT);
- screen_->toggleSelection(text, bv_, false);
- } else {
- text->selectWord(bv_, LyXText::WHOLE_WORD_STRICT);
- }
- /* This will fit the cursor on the screen
- * if necessary */
- update(text, BufferView::SELECT|BufferView::FITCUR);
+ if (text->bv_owner) {
+ screen_->hideCursor();
+ screen_->toggleSelection(text, bv_);
+ text->selectWord(bv_, LyXText::WHOLE_WORD_STRICT);
+ screen_->toggleSelection(text, bv_, false);
+ } else {
+ text->selectWord(bv_, LyXText::WHOLE_WORD_STRICT);
+ }
+ /* This will fit the cursor on the screen
+ * if necessary */
+ update(text, BufferView::SELECT|BufferView::FITCUR);
}
}
return;
if (screen_.get() && (button == 1)) {
- screen_->hideCursor();
- screen_->toggleSelection(text, bv_);
+ if (text->bv_owner) {
+ screen_->hideCursor();
+ screen_->toggleSelection(text, bv_);
+ }
text->cursorHome(bv_);
text->selection.cursor = text->cursor;
text->cursorEnd(bv_);
text->setSelection(bv_);
- screen_->toggleSelection(text, bv_, false);
+ if (text->bv_owner) {
+ screen_->toggleSelection(text, bv_, false);
+ }
/* This will fit the cursor on the screen
* if necessary */
update(text, BufferView::SELECT|BufferView::FITCUR);
2001-12-24 Juergen Vigna <jug@sad.it>
+ * BufferView_pimpl.C (tripleClick): fixed for InsetText.
+
* buffer.C (parseSingleLyXformat2Token): fixed 2 compatibility read
problems. First check a minipage also if we have some ert-contents
(not only on par->size(), second set the right depth of the paragraph