Bug 494565: [GTK] Snippet243 doesn't work because Text#insert(String)
modifies topIndex

Methods that insert or select text should not modify the topIndex of the
viewer.

To avoid this issue we calculate the visible area, positions of the
topIndex, and the insertion/selection points. If the insertion/selection
points are outside the visible area, then scroll to them. Otherwise do
nothing, which preserves the topIndex.

Tested on GTK3.22, 3.20, 3.18, 3.16, 3.14, 3.10, and 2.24. No additional
AllNonBrowser JUnit test failures occur.

Change-Id: Ib020473a5a31d535fb0b1b84f8b13e087fa16c62
Signed-off-by: Eric Williams <ericwill@redhat.com>
5 files changed
tree: 596a7fdc215c4abab98ecb085dd4ffecb0d22084
  1. bundles/
  2. examples/
  3. features/
  4. local-build/
  5. tests/
  6. .gitignore
  7. pom.xml
  8. README.md
README.md

Contributing to SWT

Thanks for your interest in this project.

Developer resources:

See the following description for how to contribute a feature or a bug fix to SWT.

Information regarding source code management, builds, coding standards, and more and be found under the following link.

Contributor License Agreement:

Before your contribution can be accepted by the project, you need to create and electronically sign the Eclipse Foundation Contributor License Agreement (CLA).

Contact:

Contact the project developers via the project's “dev” list.

Search for bugs:

This project uses Bugzilla to track ongoing development and issues.

Create a new bug:

Be sure to search for existing bugs before you create another one. Remember that contributions are always welcome!