Setting caret position to line with intra line adornment does not scroll there

SyntaxEditor for WPF Forum

Posted 7 years ago by Xinen Lee
Version: 17.2.0660
Avatar

To reproduce:

1. In Actipro's Sample Browser, add the GoTo Line's sample's controls and codebehind to the CodeLens Adornment 9 sample

2. InOnGoToLineButtonClick(), comment out the following line (because setting the caret position should be enough to scroll to the line)

//editor.ActiveView.Scroller.ScrollLineToVisibleMiddle();

3. Run the sample

4. Add more lines in the editor so that we can scroll up and down

5. Goto a line out of view, e.g. Line 70 using the "Go to Line" button - caret is placed at line 70 and view scrolls there as expected

6. Goto a line containing intraline adornment, e.g. Line 13 containing the following using the "Go to Line" button:

class FirstClass - Documentation
public class FirstClass {}

Expected result: caret is placed at line 13 and view scrolls there

Actual result: caret is placed at line 13 but view does not scroll at all

 

This behavior has broken our GoTo functionality. 

Comments (2)

Answer - Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Xinen,

We have rewritten the editor view logic that ensures a line is visible to account for intra-line adornments. These code updates will be in build 661.  If you'd like to try a preview build before the official release, please email our support address.


Actipro Software Support

Posted 7 years ago by Xinen Lee
Avatar

Thanks Actipro!!

The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.