aboutsummaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2025-08-10 20:49:54 +0530
committerAkshay Nair <phenax5@gmail.com>2025-08-10 20:49:54 +0530
commit9e8abe4f466cf771a420b6c551926c5e917f7b76 (patch)
tree0685166058b7191ad29f35b4c6cdc2e2404a29be /lua
parent5e7c88b9a4449ebafe78c83787342d9cc119784c (diff)
downloadnull-browser-9e8abe4f466cf771a420b6c551926c5e917f7b76.tar.gz
null-browser-9e8abe4f466cf771a420b6c551926c5e917f7b76.zip
Add gi key for hints to focus input elements
Diffstat (limited to '')
-rw-r--r--lua/null-browser/extras/hints.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/lua/null-browser/extras/hints.lua b/lua/null-browser/extras/hints.lua
index d6e32c7..d708d69 100644
--- a/lua/null-browser/extras/hints.lua
+++ b/lua/null-browser/extras/hints.lua
@@ -90,6 +90,11 @@ function hints.action.open_in_view()
]]
end
+function hints.action.focus()
+ web.keymap.set_mode 'i'
+ web.view.run_js([[ _nullbrowser.hints.currentMatch?.elem?.focus?.(); ]])
+end
+
function hints.action.copy_link()
web.view.run_js([[_nullbrowser.hints.currentMatch.elem?.href]], {
on_result = function(url)