case LyXRC::RC_BIBTEX_COMMAND:
case LyXRC::RC_BINDFILE:
case LyXRC::RC_CHECKLASTFILES:
+ case LyXRC::RC_COMPLETION_CURSOR_TEXT:
case LyXRC::RC_COMPLETION_INLINE_DELAY:
case LyXRC::RC_COMPLETION_INLINE_DOTS:
case LyXRC::RC_COMPLETION_INLINE_MATH:
{ "\\bind_file", LyXRC::RC_BINDFILE },
{ "\\check_lastfiles", LyXRC::RC_CHECKLASTFILES },
{ "\\chktex_command", LyXRC::RC_CHKTEX_COMMAND },
+ { "\\completion_cursor_text", LyXRC::RC_COMPLETION_CURSOR_TEXT },
{ "\\completion_inline_delay", LyXRC::RC_COMPLETION_INLINE_DELAY },
{ "\\completion_inline_dots", LyXRC::RC_COMPLETION_INLINE_DOTS },
{ "\\completion_inline_math", LyXRC::RC_COMPLETION_INLINE_MATH },
full_screen_scrollbar = true;
full_screen_width = 700;
+ completion_cursor_text = true;
completion_popup_math = true;
completion_popup_text = false;
completion_popup_delay = 2.0;
}
break;
+ case RC_COMPLETION_CURSOR_TEXT:
+ if (lexrc.next()) {
+ completion_cursor_text = lexrc.getBool();
+ }
+ break;
+
case RC_COMPLETION_POPUP_AFTER_COMPLETE:
if (lexrc.next()) {
completion_popup_after_complete = lexrc.getBool();
}
if (tag != RC_LAST)
break;
+ case RC_COMPLETION_CURSOR_TEXT:
+ if (ignore_system_lyxrc ||
+ completion_cursor_text != system_lyxrc.completion_cursor_text) {
+ os << "\\completion_cursor_text "
+ << convert<string>(completion_cursor_text) << '\n';
+ }
+ if (tag != RC_LAST)
+ break;
case RC_COMPLETION_POPUP_AFTER_COMPLETE:
if (ignore_system_lyxrc ||
completion_popup_after_complete
str = _("Show the completion popup without delay after non-unique completion attempt.");
break;
+ case RC_COMPLETION_POPUP_TEXT:
+ str = _("Show a small triangle on the cursor to indicate that a completion is available.");
+ break;
+
case RC_COMPLETION_POPUP_DELAY:
str = _("The inline completion delay.");
break;
RC_BINDFILE,
RC_CHECKLASTFILES,
RC_CHKTEX_COMMAND,
+ RC_COMPLETION_CURSOR_TEXT,
RC_COMPLETION_INLINE_DELAY,
RC_COMPLETION_INLINE_MATH,
RC_COMPLETION_INLINE_TEXT,
/// Width of limited screen (in pixels) in fullscreen mode
int full_screen_width;
///
+ bool completion_cursor_text;
+ ///
double completion_inline_delay;
///
bool completion_inline_math;
this, SIGNAL(changed()));
connect(popupAfterCompleteCB, SIGNAL(clicked()),
this, SIGNAL(changed()));
+ connect(cursorTextCB, SIGNAL(clicked()),
+ this, SIGNAL(changed()));
connect(mouseWheelSpeedSB, SIGNAL(valueChanged(double)),
this, SIGNAL(changed()));
}
rc.completion_popup_delay = popupDelaySB->value();
rc.completion_popup_math = popupMathCB->isChecked();
rc.completion_popup_text = popupTextCB->isChecked();
+ rc.completion_cursor_text = cursorTextCB->isChecked();
rc.completion_popup_after_complete
= popupAfterCompleteCB->isChecked();
rc.mouse_wheel_speed = mouseWheelSpeedSB->value();
popupDelaySB->setValue(rc.completion_popup_delay);
popupMathCB->setChecked(rc.completion_popup_math);
popupTextCB->setChecked(rc.completion_popup_text);
+ cursorTextCB->setChecked(rc.completion_cursor_text);
popupAfterCompleteCB->setChecked(rc.completion_popup_after_complete);
mouseWheelSpeedSB->setValue(rc.mouse_wheel_speed);
}
cursorInView = false;
// show cursor on screen
- bool completable = completer_.completionAvailable()
+ bool completable = cur.inset().showCompletionCursor()
+ && completer_.completionAvailable()
&& !completer_.popupVisible()
&& !completer_.inlineVisible();
if (cursorInView) {
</property>
</widget>
</item>
+ <item>
+ <widget class="QCheckBox" name="cursorTextCB" >
+ <property name="toolTip" >
+ <string>Show a small triangle on the cursor if a completion is available in text mode.</string>
+ </property>
+ <property name="text" >
+ <string>Cursor indicator</string>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_4" >
<property name="title" >
- <string>General[[PrefInput]]</string>
+ <string>General</string>
</property>
<layout class="QVBoxLayout" >
<item>
virtual bool automaticInlineCompletion() const { return true; }
/// Return true if the popup completion should be automatic.
virtual bool automaticPopupCompletion() const { return true; }
+ /// Return true if the cursor should indicate a completion.
+ virtual bool showCompletionCursor() const { return true; }
/// Returns completion suggestions at cursor position. Return an
/// null pointer if no completion is a available or possible.
/// The caller is responsible to free the returned object!
}
+bool InsetTabular::showCompletionCursor() const
+{
+ return lyxrc.completion_cursor_text;
+}
+
+
CompletionList const * InsetTabular::createCompletionList(Cursor const & cur) const
{
return completionSupported(cur) ? cur.text()->createCompletionList(cur) : 0;
///
bool automaticPopupCompletion() const;
///
+ bool showCompletionCursor() const;
+ ///
CompletionList const * createCompletionList(Cursor const & cur) const;
///
docstring completionPrefix(Cursor const & cur) const;
}
+bool InsetText::showCompletionCursor() const
+{
+ return lyxrc.completion_cursor_text;
+}
+
+
CompletionList const * InsetText::createCompletionList(Cursor const & cur) const
{
return completionSupported(cur) ? text_.createCompletionList(cur) : 0;
///
bool automaticPopupCompletion() const;
///
+ bool showCompletionCursor() const;
+ ///
CompletionList const * createCompletionList(Cursor const & cur) const;
///
docstring completionPrefix(Cursor const & cur) const;