equal
deleted
inserted
replaced
2 * Copyright (c) 2002-2018, the original author or authors. |
2 * Copyright (c) 2002-2018, the original author or authors. |
3 * |
3 * |
4 * This software is distributable under the BSD license. See the terms of the |
4 * This software is distributable under the BSD license. See the terms of the |
5 * BSD license in the documentation provided with this software. |
5 * BSD license in the documentation provided with this software. |
6 * |
6 * |
7 * http://www.opensource.org/licenses/bsd-license.php |
7 * https://opensource.org/licenses/BSD-3-Clause |
8 */ |
8 */ |
9 package jdk.internal.org.jline.utils; |
9 package jdk.internal.org.jline.utils; |
10 |
10 |
11 import java.util.Collections; |
11 import java.util.Collections; |
12 import java.util.HashMap; |
12 import java.util.HashMap; |
490 void rawPrint(int c) { |
490 void rawPrint(int c) { |
491 terminal.writer().write(c); |
491 terminal.writer().write(c); |
492 } |
492 } |
493 |
493 |
494 void rawPrint(AttributedString str) { |
494 void rawPrint(AttributedString str) { |
495 terminal.writer().write(str.toAnsi(terminal)); |
495 str.print(terminal); |
496 } |
496 } |
497 |
497 |
498 public int wcwidth(String str) { |
498 public int wcwidth(String str) { |
499 return AttributedString.fromAnsi(str).columnLength(); |
499 return AttributedString.fromAnsi(str).columnLength(); |
500 } |
500 } |