X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Fteditor%2FDocument.java;h=c84c20787e6453e987db5fcec7f01911b356e959;hb=fe0770f988e64fc0ccafd3d3b086b4a0eb559d3b;hp=c8ab746096f20971871fe8da99efbe67dd4fcade;hpb=df602ccf5e32585c26dc618dd3b4a759b6820943;p=nikiroo-utils.git diff --git a/src/jexer/teditor/Document.java b/src/jexer/teditor/Document.java index c8ab746..c84c207 100644 --- a/src/jexer/teditor/Document.java +++ b/src/jexer/teditor/Document.java @@ -456,4 +456,13 @@ public class Document { return n; } + /** + * Get the current line length. + * + * @return the number of cells needed to display the current line + */ + public int getLineLength() { + return lines.get(lineNumber).getDisplayLength(); + } + }