Skip to content

Commit

Permalink
Merge pull request #998 from ephase/fix/997
Browse files Browse the repository at this point in the history
Fix #997 crash on ikhal when create a new event when search context is active
  • Loading branch information
ephase authored Jan 18, 2021
2 parents 49e65c8 + 645bd6b commit 2bbea84
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ not released
* FIX Keybindings in empty search results no longer crash `ikhal`
* NEW Possibility to add a blank line before day in `khal` with
`blank_line_before_day` option
* FIX `new` keybinding in search no longer crash `ikhal`

0.10.2
======
Expand Down
2 changes: 2 additions & 0 deletions khal/ui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -874,6 +874,8 @@ def new(self, date, end=None):
if not self.pane.collection.writable_names:
self.pane.window.alert(('alert', 'No writable calendar.'))
return
if date is None:
date = dt.datetime.now()
if end is None:
start = dt.datetime.combine(date, dt.time(dt.datetime.now().hour))
end = start + dt.timedelta(minutes=60)
Expand Down

0 comments on commit 2bbea84

Please sign in to comment.