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/makesrna/intern/rna_space.c')
-rw-r--r--source/blender/makesrna/intern/rna_space.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 361c0e82b3b..b6c0bce4342 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -1793,7 +1793,13 @@ static void rna_SpaceTextEditor_text_set(PointerRNA *ptr,
st->text = value.data;
- WM_main_add_notifier(NC_TEXT | NA_SELECTED, st->text);
+ ScrArea *area = rna_area_from_space(ptr);
+ if (area) {
+ ARegion *region = BKE_area_find_region_type(area, RGN_TYPE_WINDOW);
+ if (region) {
+ ED_text_scroll_to_cursor(st, region, true);
+ }
+ }
}
static bool rna_SpaceTextEditor_text_is_syntax_highlight_supported(struct SpaceText *space)