Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set term #2218

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

### Bug Fixes
- [#2209](https://github.com/lapce/lapce/pull/2209): Fix macOS crashes
- [#2218](https://github.com/lapce/lapce/pull/2218): Set `TERM` environment variable in integrated terminal to xterm-256color

## 0.2.6

Expand Down
5 changes: 4 additions & 1 deletion lapce-data/src/terminal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,10 @@ impl RawTerminal {
proxy: Arc<LapceProxy>,
event_sink: ExtEventSink,
) -> Self {
let config = TermConfig::default();
let mut config = TermConfig::default();
config
.env
.insert("TERM".to_string(), "xterm-256color".to_string());
let event_proxy = EventProxy {
proxy,
event_sink,
Expand Down
3 changes: 3 additions & 0 deletions lapce-proxy/src/terminal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ impl Terminal {
) -> Terminal {
let poll = mio::Poll::new().unwrap();
let mut config = TermConfig::default();
config
.env
.insert("TERM".to_string(), "xterm-256color".to_string());
config.pty_config.working_directory =
if cwd.is_some() && cwd.clone().unwrap().exists() {
cwd
Expand Down