Re: Can you specify the No. of chars before SourceView Completion window is displayed?
- From: "David C. Rankin" <drankinatty suddenlinkmail com>
- To: gtk-app-devel-list gnome org
- Subject: Re: Can you specify the No. of chars before SourceView Completion window is displayed?
- Date: Mon, 30 Jul 2018 01:52:15 -0500
On 07/28/2018 03:35 AM, David C. Rankin wrote:
All,
I have implemented word completion with GtkSourceView, but I cannot find a
simple way to prevent the provider and proposals from popping up until 3 (or
more) characters are typed? Is there an easier way to adjust this rather than
counting chars with an iter from every begins_word and blocking the display of
the completion window until the desired number of characters have been typed?
Found it.
In the SourceView version I'm using in the (*Undocumented* in 2.11)
completion-providers/words subdirectory of the source,
gtksourcecompletionwordsbuffer.h exposes:
void gtk_source_completion_words_buffer_set_minimum_word_size (
GtkSourceCompletionWordsBuffer *buffer,
guint size);
that can be used to set the "minimum-word-size" property. You can also set the
property directly with g_object_set called on the GtkSourceCompletionWords
provider. The default value is 2. Setting to 3 does just what I wanted.
--
David C. Rankin, J.D.,P.E.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]