修复导入错误
This commit is contained in:
@@ -191,9 +191,7 @@ def _create_tmp(content: str) -> str:
|
||||
|
||||
def _open_with_nvim(file_path: str) -> None:
|
||||
# 获取终端环境变量,默认为xterm
|
||||
term = os.environ.get('TERMINAL', '')
|
||||
if not term:
|
||||
term = 'xterm'
|
||||
term = os.getenv('TERMINAL', 'xterm')
|
||||
|
||||
# 获取终端名称
|
||||
name = os.path.basename(term)
|
||||
|
||||
@@ -8,16 +8,16 @@ class DeleteMenu:
|
||||
self._r = r
|
||||
|
||||
def run(self):
|
||||
try:
|
||||
result = run_search("")
|
||||
except Exception as e:
|
||||
print(f"Error: {e}")
|
||||
self._r.error(str(e))
|
||||
return
|
||||
if result.status != "SUCCESS":
|
||||
self._r.error(result.data)
|
||||
return
|
||||
while True:
|
||||
try:
|
||||
result = run_search("")
|
||||
except Exception as e:
|
||||
print(f"Error: {e}")
|
||||
self._r.error(str(e))
|
||||
return
|
||||
if result.status != "SUCCESS":
|
||||
self._r.error(result.data)
|
||||
return
|
||||
if len(result.data) == 0:
|
||||
self._r.select("删除", ["未找到Snippet记录"])
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user