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

Terminal: Fix bugs in #324 #334

Merged
merged 2 commits into from Jul 7, 2020
Merged

Conversation

HollowMan6
Copy link
Contributor

Add a variable to mark whether it's the first time to run it so that the app won't exit without notification when launching it for the first time.

Fix the following bug:

Traceback (most recent call last):
  File "/home/mt/.emacs.d/site-elisp/emacs-application-framework/app/terminal/buffer.py", line 87, in on_change_directory
    self.update_title()
  File "/home/mt/.emacs.d/site-elisp/emacs-application-framework/app/terminal/buffer.py", line 92, in update_title
    self.change_title(self.buffer_widget.execute_js("title"))
  File "/home/mt/.emacs.d/site-elisp/emacs-application-framework/core/buffer.py", line 209, in change_title
    self.update_buffer_details.emit(self.buffer_id, new_title, self.url)
TypeError: Buffer.update_buffer_details[str, str, str].emit(): argument 2 has unexpected type 'QVariant'

@HollowMan6
Copy link
Contributor Author

研究了下在terminal中使用sh,发现不能仅仅通过执行exit命令就判断退出,否则在sh中执行exit整个的就退出了,所以又用回了老方法,增加了判断是否为初次运行的变量。

目前这个匹配方式过于依赖terminal,比如这么做就会出问题:

$ cd ~
$ sh
$ ls
$ cd /

@manateelazycat
Copy link
Member

我原来写 deepin-terminal, vte 终端控件有 exit 信号

建议要监听 server.js 的子进程状态,子进程退出的方式最靠谱,其他的方式都是 hacking way, 太脆弱

@HollowMan6
Copy link
Contributor Author

我原来写 deepin-terminal, vte 终端控件有 exit 信号

建议要监听 server.js 的子进程状态,子进程退出的方式最靠谱,其他的方式都是 hacking way, 太脆弱

谢谢您的建议!很Nice,已经按这个方法更新!

@MatthewZMD MatthewZMD merged commit 849f0d9 into emacs-eaf:master Jul 7, 2020
@MatthewZMD
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants