summaryrefslogtreecommitdiff
path: root/src/ui/util.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-12-19 07:33:34 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-12-19 07:33:34 +0200
commitfacdf3ca44c170aec9466b7e309a209de0c7f643 (patch)
tree662f0ba2c86c618d9cb3954f6a36ac1005534ed3 /src/ui/util.c
parentb6923950df99ba6c8ca1e7234440321901fe804c (diff)
Opening unrecognized schemes in default browser
This works if the OS supports the scheme as built-in or via some handler application. IssueID #103 IssueID #84
Diffstat (limited to 'src/ui/util.c')
-rw-r--r--src/ui/util.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ui/util.c b/src/ui/util.c
index b6378055..855f0fb3 100644
--- a/src/ui/util.c
+++ b/src/ui/util.c
@@ -135,6 +135,11 @@ int keyMods_Sym(int kmods) {
135 return kmods; 135 return kmods;
136} 136}
137 137
138int openTabMode_Sym(int kmods) {
139 const int km = keyMods_Sym(kmods);
140 return ((km & KMOD_PRIMARY) && (km & KMOD_SHIFT)) ? 1 : (km & KMOD_PRIMARY) ? 2 : 0;
141}
142
138iRangei intersect_Rangei(iRangei a, iRangei b) { 143iRangei intersect_Rangei(iRangei a, iRangei b) {
139 if (a.end < b.start || a.start > b.end) { 144 if (a.end < b.start || a.start > b.end) {
140 return (iRangei){ 0, 0 }; 145 return (iRangei){ 0, 0 };