Skip to content

Commit

Permalink
edit-and-execute widget: set BRACKETED_PASTE_OFF before editing
Browse files Browse the repository at this point in the history
  • Loading branch information
mattirn committed Nov 24, 2020
1 parent 23034db commit 0ba7e81
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1072,6 +1072,9 @@ public void addCommandsInBuffer(Collection<String> commands) {

@Override
public void editAndAddInBuffer(File file) throws Exception {
if (isSet(Option.BRACKETED_PASTE)) {
terminal.writer().write(BRACKETED_PASTE_OFF);
}
Constructor<?> ctor = Class.forName("org.jline.builtins.Nano").getConstructor(Terminal.class, File.class);
Editor editor = (Editor) ctor.newInstance(terminal, new File(file.getParent()));
editor.setRestricted(true);
Expand Down

0 comments on commit 0ba7e81

Please sign in to comment.