mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 02:14:50 +00:00
Since we don't do anything if the cursor isn't in view, do that test
first. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33803 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
25df3fa83d
commit
d0434b96e8
@ -397,6 +397,7 @@ void GuiWorkArea::stopBlinkingCursor()
|
||||
void GuiWorkArea::startBlinkingCursor()
|
||||
{
|
||||
showCursor();
|
||||
|
||||
//we're not supposed to cache this value.
|
||||
int const time = QApplication::cursorFlashTime() / 2;
|
||||
if (time <= 0)
|
||||
@ -544,6 +545,12 @@ void GuiWorkArea::showCursor()
|
||||
if (cursor_visible_)
|
||||
return;
|
||||
|
||||
Point p;
|
||||
int h = 0;
|
||||
buffer_view_->cursorPosAndHeight(p, h);
|
||||
if (!buffer_view_->cursorInView(p, h))
|
||||
return;
|
||||
|
||||
// RTL or not RTL
|
||||
bool l_shape = false;
|
||||
Font const & realfont = buffer_view_->cursor().real_current_font;
|
||||
@ -558,19 +565,14 @@ void GuiWorkArea::showCursor()
|
||||
if (realfont.language() == latex_language)
|
||||
l_shape = false;
|
||||
|
||||
Point p;
|
||||
int h = 0;
|
||||
buffer_view_->cursorPosAndHeight(p, h);
|
||||
// show cursor on screen
|
||||
Cursor & cur = buffer_view_->cursor();
|
||||
bool completable = cur.inset().showCompletionCursor()
|
||||
&& completer_->completionAvailable()
|
||||
&& !completer_->popupVisible()
|
||||
&& !completer_->inlineVisible();
|
||||
if (buffer_view_->cursorInView(p, h)) {
|
||||
cursor_visible_ = true;
|
||||
showCursor(p.x_, p.y_, h, l_shape, isrtl, completable);
|
||||
}
|
||||
cursor_visible_ = true;
|
||||
showCursor(p.x_, p.y_, h, l_shape, isrtl, completable);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user