From 89b3c9da48cf685361105df1ca2e9ed27ef240ae Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 8 Apr 2021 21:56:06 +1000 Subject: Text Editor: don't force other views to follow the cursor While the existing behavior worked as intended, it wasn't possible to have two views on the same file at different locations. Since there isn't much use in having two views open at the same location allow one view to be at a different scroll location. UI edit-source and selecting a text data block now need explicit calls to scroll to the cursor location. Resolves T87284 --- source/blender/editors/space_text/text_draw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/space_text/text_draw.c') diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index 8b8034124d9..17831c95575 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -1739,7 +1739,7 @@ void text_update_character_width(SpaceText *st) /* Moves the view to the cursor location, * also used to make sure the view isn't outside the file */ -void text_scroll_to_cursor(SpaceText *st, ARegion *region, const bool center) +void ED_text_scroll_to_cursor(SpaceText *st, ARegion *region, const bool center) { Text *text; int i, x, winx = region->winx; @@ -1818,7 +1818,7 @@ void text_scroll_to_cursor__area(SpaceText *st, ScrArea *area, const bool center region = BKE_area_find_region_type(area, RGN_TYPE_WINDOW); if (region) { - text_scroll_to_cursor(st, region, center); + ED_text_scroll_to_cursor(st, region, center); } } -- cgit v1.2.3