Skip to content

Commit

Permalink
Remove reference to LineReaderImpl from the example
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet committed Mar 3, 2017
1 parent cd7ecf6 commit a829116
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions builtins/src/test/java/org/jline/example/Example.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import org.jline.keymap.KeyMap;
import org.jline.reader.*;
import org.jline.reader.impl.DefaultParser;
import org.jline.reader.impl.LineReaderImpl;
import org.jline.reader.impl.completer.ArgumentCompleter;
import org.jline.reader.impl.completer.StringsCompleter;
import org.jline.terminal.Cursor;
Expand Down Expand Up @@ -315,7 +314,7 @@ else if ("tput".equals(pl.word())) {
else if ("bindkey".equals(pl.word())) {
if (pl.words().size() == 1) {
StringBuilder sb = new StringBuilder();
Map<String, Binding> bound = ((LineReaderImpl) reader).getKeys().getBoundKeys();
Map<String, Binding> bound = reader.getKeys().getBoundKeys();
for (Map.Entry<String, Binding> entry : bound.entrySet()) {
sb.append("\"");
entry.getKey().chars().forEachOrdered(c -> {
Expand Down Expand Up @@ -348,7 +347,7 @@ else if ("bindkey".equals(pl.word())) {
terminal.writer().print(sb.toString());
terminal.flush();
} else if (pl.words().size() == 3) {
((LineReaderImpl) reader).getKeys().bind(
reader.getKeys().bind(
new Reference(pl.words().get(2)), KeyMap.translate(pl.words().get(1))
);
}
Expand Down

0 comments on commit a829116

Please sign in to comment.