summaryrefslogtreecommitdiffstats
path: root/src/calcurse.c
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2012-11-18 21:50:15 +0100
committerLukas Fleischer <calcurse@cryptocrack.de>2012-11-18 22:48:31 +0100
commit8fd6640caf1961c71c66a9c559f340d86cf17893 (patch)
treeaae95ed461be3c3c0924e9d46ef79ec053db9824 /src/calcurse.c
parentf2dca7de3e8b164a4b3af3d58dde2f6776bfbee6 (diff)
downloadcalcurse-8fd6640caf1961c71c66a9c559f340d86cf17893.tar.gz
calcurse-8fd6640caf1961c71c66a9c559f340d86cf17893.zip
Refactor todo_chg_priority()
Instead of passing a key, pass the number of steps to increase the priority by. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/calcurse.c')
-rw-r--r--src/calcurse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/calcurse.c b/src/calcurse.c
index 84bd06a..b3b9098 100644
--- a/src/calcurse.c
+++ b/src/calcurse.c
@@ -221,7 +221,8 @@ static inline void key_pipe_item(int key)
static inline void key_change_priority(int key)
{
if (wins_slctd() == TOD && todo_hilt() != 0) {
- todo_chg_priority(todo_get_item(todo_hilt()), key);
+ todo_chg_priority(todo_get_item(todo_hilt()),
+ key == KEY_RAISE_PRIORITY ? 1 : -1);
if (todo_hilt_pos() < 0)
todo_set_first(todo_hilt());
else if (todo_hilt_pos() >= win[TOD].h - 4)