alibaba / termd

Apache License 2.0
121 stars 50 forks source link

Keymap.getDefault() method get a empty inputstream problem. #67

Open godtroop-github opened 1 year ago

godtroop-github commented 1 year ago

public static Keymap getDefault() { InputStream inputrc = null; try { inputrc = Keymap.class.getResourceAsStream("inputrc"); } finally { if (inputrc != null) { try { inputrc.close(); } catch (IOException e) { // ignore } } }

return new Keymap(inputrc); // this line get a closed inputstream, this may cause keymap initializing failed.

}

Just like the comment, using example/readline can reproduce it.