diff options
author | Jason Lee <changjin9792@gmail.com> | 2023-03-24 01:07:40 +0800 |
---|---|---|
committer | Jason Lee <changjin9792@gmail.com> | 2023-03-24 01:07:40 +0800 |
commit | 68b07a0b4ee655f7e875ca83b004e569935f5b5e (patch) | |
tree | e9ecde954427e33296a882928d3161145a0dcb68 | |
parent | e2544079f50833685a5465a42b989b288e9d27d4 (diff) |
[Fix] Fixed `ctrl+o` upon initial `git cal` command error
- Changed `ctrl+o` and `ctrl+p` commands to `w` and `e`.
issue #11
-rw-r--r-- | girok/calendar_cli/calendar_main.py | 4 | ||||
-rw-r--r-- | girok/utils/calendar.py | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/girok/calendar_cli/calendar_main.py b/girok/calendar_cli/calendar_main.py index 8e7ffa1..e2d5717 100644 --- a/girok/calendar_cli/calendar_main.py +++ b/girok/calendar_cli/calendar_main.py @@ -34,8 +34,8 @@ class Entry(App): ("u", "show_previous_month", "Show prev month"), ("i", "show_next_month", "Show next month"), ("y", "show_current_month", "Show current month"), - ("ctrl+p", "focus_on_calendar", "Move to calendar"), - ("ctrl+o", "focus_on_sidebar", "Move to sidebar"), + ("e", "focus_on_calendar", "Move to calendar"), + ("w", "focus_on_sidebar", "Move to sidebar"), ("ctrl+j", "move_down_to_tag_tree", "Move down to tag tree"), ("ctrl+k", "move_up_to_category_tree", "Move up to category tree"), ("o", 'close_pop_up', "Close pop up box"), diff --git a/girok/utils/calendar.py b/girok/utils/calendar.py index 5dc98d4..4dd250e 100644 --- a/girok/utils/calendar.py +++ b/girok/utils/calendar.py @@ -64,6 +64,8 @@ def get_date_obj_from_str_separated_by_T(s: str): def remove_left_arrow(cell): + if cell is None: + return if not cell.children: return cell_label = cell.children[0] |