aboutsummaryrefslogtreecommitdiff
path: root/contactWind.c
diff options
context:
space:
mode:
authorache <ache@ache.one>2019-01-24 08:23:52 +0100
committerache <ache@ache.one>2019-01-24 08:23:52 +0100
commit69835a1cfec9c66f954ae61e64444fea9a82a02f (patch)
tree87d62c66c94405b143baa089d12856837ec89c0f /contactWind.c
parentSearch case insensive (diff)
Set selected contact
Diffstat (limited to 'contactWind.c')
-rw-r--r--contactWind.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/contactWind.c b/contactWind.c
index 8a3f46c..fee0ffd 100644
--- a/contactWind.c
+++ b/contactWind.c
@@ -25,6 +25,11 @@ void selectNextContact(void) {
if( contactListSelection < nbContacts - 1)
contactListSelection++;
}
+void setContactSelection(contact* c) {
+ int i = c - contactList;
+ if( i >= 0 && i < nbContacts )
+ contactListSelection = i;
+}
void selectPreviousContact(void) {
if( contactListSelection > 0)
contactListSelection--;