File tree Expand file tree Collapse file tree
integrationTest/java/org/fxmisc/richtext/api/selection
main/java/org/fxmisc/richtext Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -159,7 +159,6 @@ public void end_position_is_correct_when_change_occurs_after_position() {
159159 });
160160 }
161161
162- @ Test
163162 public void deletion_which_includes_selection_and_which_occurs_at_end_of_area_moves_selection_to_new_area_end () {
164163 interact (() -> {
165164 selection .selectRange (area .getLength (), area .getLength ());
@@ -168,16 +167,4 @@ public void deletion_which_includes_selection_and_which_occurs_at_end_of_area_mo
168167 assertEquals (area .getLength (), selection .getEndPosition ());
169168 });
170169 }
171-
172- @ Test
173- public void anchor_updates_correctly_with_listener_attached () {
174- interact (() -> {
175- area .clear ();
176- area .anchorProperty ().addListener ( (ob ,ov ,nv ) -> nv ++ );
177- area .appendText ("asdf" );
178- area .selectRange (1 ,2 );
179- assertEquals ("s" ,area .getSelectedText ());
180- assertEquals (1 ,area .getAnchor ());
181- });
182- }
183170}
Original file line number Diff line number Diff line change @@ -431,10 +431,6 @@ public void displaceCaret(int position) {
431431 public void displaceSelection (int startPosition , int endPosition ) {
432432 doUpdate (() -> {
433433 delegateSelection .selectRange (startPosition , endPosition );
434-
435- if ( startPosition < endPosition && internalStartedByAnchor .getValue () ) {
436- internalStartedByAnchor .setValue ( false ); // See #874
437- }
438434 internalStartedByAnchor .setValue (startPosition < endPosition );
439435 });
440436 }
@@ -453,10 +449,6 @@ public void dispose() {
453449 private void doSelect (int startPosition , int endPosition , boolean anchorIsStart ) {
454450 doUpdate (() -> {
455451 delegateSelection .selectRange (startPosition , endPosition );
456-
457- if ( anchorIsStart && internalStartedByAnchor .getValue () ) {
458- internalStartedByAnchor .setValue ( false ); // See #874
459- }
460452 internalStartedByAnchor .setValue (anchorIsStart );
461453
462454 delegateCaret .moveTo (anchorIsStart ? endPosition : startPosition );
You can’t perform that action at this time.
0 commit comments