Skip to content

Commit

Permalink
Fix dict copying for based trigger_dict
Browse files Browse the repository at this point in the history
  • Loading branch information
bill88t committed Nov 19, 2023
1 parent de65498 commit 633d592
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions source/ljinux.py
Original file line number Diff line number Diff line change
Expand Up @@ -1668,15 +1668,15 @@ def shell(led=True, nalias=False):
"idle": 20,
}

if "trigger_dict_bck" not in pv[get_pid()]:
vr("trigger_dict_bck", dict(term.trigger_dict))
# the dict() is needed to actually copy.
if "trigger_dict_bck" not in pv[get_pid()].keys():
vr("trigger_dict_bck", term.trigger_dict.copy())
# the dict() needs to be copied, not referenced.
pvd[get_pid()]["preserve"] = True

command_input = None
if not pv[0]["Exit"]:
if term.trigger_dict != vr("trigger_dict_bck"):
term.trigger_dict = vr("trigger_dict_bck")
term.trigger_dict = vr("trigger_dict_bck").copy()
# This can trigger for different prefix

while ((command_input == None) or (command_input == "\n")) and not pv[
Expand Down

0 comments on commit 633d592

Please sign in to comment.