backport: 15.1.1
This commit is contained in:
parent
8a0436b3df
commit
ce188b27bd
3 changed files with 15 additions and 2 deletions
|
@ -17,6 +17,13 @@ Changelog structure reference:
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
## [15.1.1]
|
||||
|
||||
### Fixed
|
||||
|
||||
- Project
|
||||
- PTY emulation is now opt-in in run configurations
|
||||
|
||||
## [15.1.0]
|
||||
|
||||
### Added
|
||||
|
|
|
@ -57,7 +57,7 @@ public abstract class ProfileStateBase<T extends ZigExecConfigBase<T>> extends C
|
|||
|
||||
// TODO remove this check once JetBrains implements colored terminal in the debugger
|
||||
// https://youtrack.jetbrains.com/issue/CPP-11622/ANSI-color-codes-not-honored-in-Debug-Run-Configuration-output-window
|
||||
val cli = debug ? new GeneralCommandLine() : new PtyCommandLine();
|
||||
val cli = configuration.emulateTerminal() && !debug ? new PtyCommandLine() : new GeneralCommandLine();
|
||||
cli.setExePath(zigExecutablePath.toString());
|
||||
workingDirectory.getPath().ifPresent(x -> cli.setWorkDirectory(x.toFile()));
|
||||
cli.setCharset(StandardCharsets.UTF_8);
|
||||
|
|
|
@ -38,6 +38,7 @@ import java.util.Optional;
|
|||
@Getter
|
||||
public abstract class ZigExecConfigBase<T extends ZigExecConfigBase<T>> extends LocatableConfigurationBase<ProfileStateBase<T>> {
|
||||
private ZigConfigEditor.WorkDirectoryConfigurable workingDirectory = new ZigConfigEditor.WorkDirectoryConfigurable("workingDirectory");
|
||||
private ZigConfigEditor.CheckboxConfigurable pty = new ZigConfigEditor.CheckboxConfigurable("pty", "Emulate Terminal", false);
|
||||
public ZigExecConfigBase(@NotNull Project project, @NotNull ConfigurationFactory factory, @Nullable String name) {
|
||||
super(project, factory, name);
|
||||
workingDirectory.setPath(getProject().isDefault() ? null : Optional.ofNullable(ProjectUtil.guessProjectDir(getProject()))
|
||||
|
@ -64,10 +65,15 @@ public abstract class ZigExecConfigBase<T extends ZigExecConfigBase<T>> extends
|
|||
|
||||
public abstract List<String> buildCommandLineArgs(boolean debug) throws ExecutionException;
|
||||
|
||||
public boolean emulateTerminal() {
|
||||
return pty.value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public T clone() {
|
||||
val myClone = (ZigExecConfigBase<?>) super.clone();
|
||||
myClone.workingDirectory = workingDirectory.clone();
|
||||
myClone.pty = pty.clone();
|
||||
return (T) myClone;
|
||||
}
|
||||
|
||||
|
@ -79,6 +85,6 @@ public abstract class ZigExecConfigBase<T extends ZigExecConfigBase<T>> extends
|
|||
throws ExecutionException;
|
||||
|
||||
public @NotNull List<ZigConfigEditor.@NotNull ZigConfigurable<?>> getConfigurables() {
|
||||
return List.of(workingDirectory);
|
||||
return List.of(workingDirectory, pty);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue