Bug 2960 - Jumping to error scrolls editor horizontally
Summary: Jumping to error scrolls editor horizontally
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: General ()
Version: Trunk
Hardware: PC Mac OS
: High normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-01-18 17:26 UTC by Mikayla Hutchinson [MSFT]
Modified: 2012-01-20 17:59 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Mikayla Hutchinson [MSFT] 2012-01-18 17:26:06 UTC
When double-clicking on an error in the file pad, if the file was not already open, then MonoDevelop positions the scrollbars such that the caret is just inside in the top left of the editor. This means that it is scrolled horizontally to the right, which is really annoying.
Comment 1 Jeffrey Stedfast 2012-01-20 17:59:11 UTC
I *think* I've finally figured out the issue and fixed this in git. The problem seemed to be that the cursor scrolling code was being invoked *before* a window size had been properly allocated, and thus the adjustment page size and the allocation.width/height were all 1 which makes the math all wrong.

Instead, what we want to do, is wait until SizeAllocated and then invoke the scroll. There was already logic for this, but it assumed that IsRealized was only ever true if the size had already been requested.