summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Geier <geier@lostpackets.de>2024-04-23 23:54:23 +0200
committerGitHub <noreply@github.com>2024-04-23 23:54:23 +0200
commit120692f38f9b11fe0c5f4b7351f0ad3027098c38 (patch)
treebd7fca0f14aaa493ea1a112d0e6314d883093133
parentf5f1235a683b7b96280f8d9f4b87464c03421d24 (diff)
parent14d3e04cab80853dc0e198971d23c9fb83bc078c (diff)
Merge pull request #1346 from Pi2048/eventeditorui
Update the date and time when pressing Alt+Enter or Page Up/Down in edit widget
-rw-r--r--AUTHORS.txt1
-rw-r--r--CHANGELOG.rst2
-rw-r--r--khal/ui/editor.py3
-rw-r--r--khal/ui/widgets.py6
4 files changed, 9 insertions, 3 deletions
diff --git a/AUTHORS.txt b/AUTHORS.txt
index 4c80798a..102b2e34 100644
--- a/AUTHORS.txt
+++ b/AUTHORS.txt
@@ -55,3 +55,4 @@ Matthew Rademaker - matthew.rademaker [at] gmail [dot] com
Valentin Iovene - val [at] too [dot] gy
Julian Wollrath
Mattori Birnbaum - me [at] mattori [dot] com - https://mattori.com
+Pi R
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 866e9fdc..5f3b69e0 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -32,6 +32,8 @@ not released yet
`?` for tentative); partication status is shown for the email addresses
configured for the event's calendar
* NEW support for color theme, command, and formatter plugins
+* FIX an issue where ikhal would forget changes to time or date fields if you
+ left the field with page up/down or meta+enter
0.11.2
======
diff --git a/khal/ui/editor.py b/khal/ui/editor.py
index 82a9220e..50195be2 100644
--- a/khal/ui/editor.py
+++ b/khal/ui/editor.py
@@ -610,10 +610,11 @@ class EventEditor(urwid.WidgetWrap):
return None
else:
self._abort_confirmed = False
+ return_value = super().keypress(size, key)
if key in self.pane._conf['keybindings']['save']:
self.save(None)
return None
- return super().keypress(size, key)
+ return return_value
WEEKDAYS = ['MO', 'TU', 'WE', 'TH', 'FR', 'SA', 'SU'] # TODO use locale and respect weekdaystart
diff --git a/khal/ui/widgets.py b/khal/ui/widgets.py
index 568c6af2..7f6ca6e4 100644
--- a/khal/ui/widgets.py
+++ b/khal/ui/widgets.py
@@ -138,7 +138,8 @@ class DateTimeWidget(ExtendedEdit):
return None
if (
- key in ['up', 'down', 'tab', 'shift tab'] or
+ key in ['up', 'down', 'tab', 'shift tab',
+ 'page up', 'page down', 'meta enter'] or
(key in ['right'] and self.edit_pos >= len(self.edit_text)) or
(key in ['left'] and self.edit_pos == 0)):
# when leaving the current Widget we check if currently
@@ -436,7 +437,8 @@ class ValidatedEdit(urwid.WidgetWrap):
def keypress(self, size, key):
if (
- key in ['up', 'down', 'tab', 'shift tab'] or
+ key in ['up', 'down', 'tab', 'shift tab',
+ 'page up', 'page down', 'meta enter'] or
(key in ['right'] and self.edit_pos >= len(self.edit_text)) or
(key in ['left'] and self.edit_pos == 0)):
if not self._validate():