Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-12-31 20:24:49 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-12-31 20:24:49 +0400
commitdd62a2c3756d4335479a561a52468a548f2f1d65 (patch)
tree2a4a40d8148cb3d14155e47e59b09e3305495be8 /source/blender/editors/space_text/text_autocomplete.c
parentf54b6eee45cf24450076d39c3fa3bd0d4e21f564 (diff)
text autocomplete
- make the popup box line up the X axis with the current word. - add poll function for the operator
Diffstat (limited to 'source/blender/editors/space_text/text_autocomplete.c')
-rw-r--r--source/blender/editors/space_text/text_autocomplete.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/source/blender/editors/space_text/text_autocomplete.c b/source/blender/editors/space_text/text_autocomplete.c
index 097174f2645..46e2f99d3fa 100644
--- a/source/blender/editors/space_text/text_autocomplete.c
+++ b/source/blender/editors/space_text/text_autocomplete.c
@@ -147,13 +147,7 @@ static GHash *text_autocomplete_build(Text *text)
/* first get the word we're at */
{
- int i = text->curc;
- while (i--) {
- if (!text_check_identifier(text->curl->line[i])) {
- break;
- }
- }
- i++;
+ const int i = text_find_identifier_start(text->curl->line, text->curc);
seek_len = text->curc - i;
seek = text->curl->line + i;
@@ -550,7 +544,7 @@ void TEXT_OT_autocomplete(wmOperatorType *ot)
ot->invoke = text_autocomplete_invoke;
ot->cancel = text_autocomplete_cancel;
ot->modal = text_autocomplete_modal;
- //ot->poll = ED_operator_view3d_active;
+ ot->poll = text_space_edit_poll;
/* flags */
ot->flag = OPTYPE_BLOCKING;