X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Fteditor%2FDocument.java;h=56591244ef8abfe77dd98b92de09f2c0e7ada7f8;hb=5dccc93977b5f3cbde6e791404e5e43ae540ff54;hp=bd8e91f7a48fa575747fca4e7a0cfb8e22c4248a;hpb=615a0d99fd0aa4437116dd083147f9150d5e6527;p=nikiroo-utils.git diff --git a/src/jexer/teditor/Document.java b/src/jexer/teditor/Document.java index bd8e91f..5659124 100644 --- a/src/jexer/teditor/Document.java +++ b/src/jexer/teditor/Document.java @@ -3,7 +3,7 @@ * * The MIT License (MIT) * - * Copyright (C) 2017 Kevin Lamonte + * Copyright (C) 2019 Kevin Lamonte * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -413,7 +413,7 @@ public class Document { */ public void enter() { dirty = true; - int cursor = lines.get(lineNumber).getCursor(); + int cursor = lines.get(lineNumber).getRawCursor(); String original = lines.get(lineNumber).getRawString(); String firstLine = original.substring(0, cursor); String secondLine = original.substring(cursor); @@ -430,7 +430,7 @@ public class Document { * * @param ch the character to replace or insert */ - public void addChar(final char ch) { + public void addChar(final int ch) { dirty = true; if (overwrite) { lines.get(lineNumber).replaceChar(ch);