diff options
author | mcherkas <none@none> | 2013-05-29 18:40:02 +0400 |
---|---|---|
committer | mcherkas <none@none> | 2013-05-29 18:40:02 +0400 |
commit | cda772b415aecd6ab3211187e31b7dc19cfb7214 (patch) | |
tree | a08c142a18fa14916154084bc05f3ce73858ed16 /src/share/classes/javax/swing/text | |
parent | 760ffbd0f7da102554f127fd7d234adc4ff2b069 (diff) |
8014863: Line break calculations in Java 7 are incorrect.
Reviewed-by: alexp, alexsch
Contributed-by: Dmitry Markov <dmitry.markov@oracle.com>
Diffstat (limited to 'src/share/classes/javax/swing/text')
-rw-r--r-- | src/share/classes/javax/swing/text/View.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/share/classes/javax/swing/text/View.java b/src/share/classes/javax/swing/text/View.java index 1722951c6..097e6c333 100644 --- a/src/share/classes/javax/swing/text/View.java +++ b/src/share/classes/javax/swing/text/View.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1174,6 +1174,7 @@ public abstract class View implements SwingConstants { // formed by added elements (i.e. they will be updated // by initialization. index0 = Math.max(index0, 0); + index1 = getViewIndex(elem.getDocument().getLength(), Position.Bias.Forward); for (int i = index0; i <= index1; i++) { if (! ((i >= hole0) && (i <= hole1))) { v = getView(i); |