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:
Diffstat (limited to 'source/blender/editors/space_text/space_text.c')
-rw-r--r--source/blender/editors/space_text/space_text.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/editors/space_text/space_text.c b/source/blender/editors/space_text/space_text.c
index 24f282ff920..8bfb6c87625 100644
--- a/source/blender/editors/space_text/space_text.c
+++ b/source/blender/editors/space_text/space_text.c
@@ -82,7 +82,7 @@ static SpaceLink *text_new(const ScrArea *UNUSED(area), const Scene *UNUSED(scen
BLI_addtail(&stext->regionbase, ar);
ar->regiontype = RGN_TYPE_UI;
- ar->alignment = RGN_ALIGN_LEFT;
+ ar->alignment = RGN_ALIGN_RIGHT;
ar->flag = RGN_FLAG_HIDDEN;
/* main region */
@@ -197,8 +197,7 @@ static void text_operatortypes(void)
WM_operatortype_append(TEXT_OT_duplicate_line);
WM_operatortype_append(TEXT_OT_convert_whitespace);
- WM_operatortype_append(TEXT_OT_uncomment);
- WM_operatortype_append(TEXT_OT_comment);
+ WM_operatortype_append(TEXT_OT_comment_toggle);
WM_operatortype_append(TEXT_OT_unindent);
WM_operatortype_append(TEXT_OT_indent);
@@ -254,7 +253,9 @@ static int text_context(const bContext *C, const char *member, bContextDataResul
return 1;
}
else if (CTX_data_equals(member, "edit_text")) {
- CTX_data_id_pointer_set(result, &st->text->id);
+ if (st->text != NULL) {
+ CTX_data_id_pointer_set(result, &st->text->id);
+ }
return 1;
}