X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Feu%2Fsvjatoslav%2Fsixth%2Fe3d%2Fgui%2FtextEditorComponent%2FTextLine.java;h=590729bef284bb39445b8dc512f4f4f94fdccf1c;hb=6b39de1e9e80433b78ae731845551e742718d613;hp=4e1ba764471c3d2bde1820f172d84955bfeb9eaa;hpb=03447008b8ee26a6463d2cd03005dc26464863db;p=sixth-3d.git diff --git a/src/main/java/eu/svjatoslav/sixth/e3d/gui/textEditorComponent/TextLine.java b/src/main/java/eu/svjatoslav/sixth/e3d/gui/textEditorComponent/TextLine.java index 4e1ba76..590729b 100755 --- a/src/main/java/eu/svjatoslav/sixth/e3d/gui/textEditorComponent/TextLine.java +++ b/src/main/java/eu/svjatoslav/sixth/e3d/gui/textEditorComponent/TextLine.java @@ -1,5 +1,5 @@ /* - * Sixth 3D engine. Copyright ©2012-2016, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu + * Sixth 3D engine. Copyright ©2012-2020, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu * * This program is free software; you can redistribute it and/or * modify it under the terms of version 3 of the GNU Lesser General Public License @@ -107,7 +107,7 @@ public class TextLine { return 0; for (int i = 0; i < chars.size(); i++) - if (!chars.get(i).isEmpty()) + if (chars.get(i).hasValue()) return i; throw new RuntimeException("This code shall never execute"); @@ -172,7 +172,7 @@ public class TextLine { int newLength = 0; for (int i = chars.size() - 1; i >= 0; i--) - if (!chars.get(i).isEmpty()) { + if (chars.get(i).hasValue()) { newLength = i + 1; break; }