File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 1
- import tempfile
2
1
import webbrowser
3
2
from pathlib import Path
4
3
18
17
tag: user.cursorless
19
18
"""
20
19
21
- cheatsheet_out_dir = Path (tempfile .mkdtemp ())
22
20
instructions_url = "https://www.cursorless.org/docs/"
23
21
24
22
@@ -44,8 +42,12 @@ def cursorless_open_instructions():
44
42
@ctx .action_class ("user" )
45
43
class Actions :
46
44
def cursorless_cheat_sheet_show_html ():
47
- """Show new cursorless html cheat sheet"""
48
- cheatsheet_out_path = cheatsheet_out_dir / "cheatsheet.html"
45
+ """Show cursorless html cheat sheet"""
46
+ # NB: We use the user's home directory instead of temp to make sure that
47
+ # Linux snaps work
48
+ cheatsheet_out_dir = Path .home () / ".cursorless" / "cheatsheet"
49
+ cheatsheet_out_dir .mkdir (parents = True , exist_ok = True )
50
+ cheatsheet_out_path = cheatsheet_out_dir / "index.html"
49
51
run_rpc_command_and_wait (
50
52
"cursorless.showCheatsheet" ,
51
53
{
You can’t perform that action at this time.
0 commit comments