From c51476e627b6d5f49968e788132641bd1ffd8991 Mon Sep 17 00:00:00 2001 From: Mason Larobina Date: Thu, 2 Sep 2010 02:08:17 +0800 Subject: [PATCH] Add Ctrl+c stop binding. --- config/binds.lua | 9 +++++---- config/webview.lua | 5 ++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/config/binds.lua b/config/binds.lua index bca655f81..719ff3d55 100644 --- a/config/binds.lua +++ b/config/binds.lua @@ -91,14 +91,15 @@ binds.mode_binds = { key({"Control"}, "Page_Down", function (w) w:next_tab() end), buf("^[0-9]*gT$", function (w, b) w:prev_tab(tonumber(string.match(b, "^(%d*)gT$") or 1)) end), buf("^[0-9]*gt$", function (w, b) w:next_tab(tonumber(string.match(b, "^(%d*)gt$") or 1)) end), - buf("^gH$", function (w) w:new_tab(homepage) end), buf("^d$", function (w) w:close_tab() end), + key({}, "<", function (w) w.tabs:reorder(w:get_current(), w.tabs:current() -1) end), + key({}, ">", function (w) w.tabs:reorder(w:get_current(), (w.tabs:current() + 1) % w.tabs:count()) end), - key({}, "r", function (w) w:reload() end), + buf("^gH$", function (w) w:new_tab(homepage) end), buf("^gh$", function (w) w:navigate(homepage) end), - key({}, "<", function (w) w.tabs:reorder(w:get_current(), w.tabs:current() -1) end), - key({}, ">", function (w) w.tabs:reorder(w:get_current(), (w.tabs:current() + 1) % w.tabs:count()) end), + key({}, "r", function (w) w:reload() end), + key({"Control"}, "c", function (w) w:stop() end), -- Window buf("^ZZ$", function (w) w:close_win() end), diff --git a/config/webview.lua b/config/webview.lua index 82f5063ec..f7c5335e4 100644 --- a/config/webview.lua +++ b/config/webview.lua @@ -212,9 +212,8 @@ webview.init_funcs = { -- as the first argument. All methods must take `view` & `w` as the first two -- arguments. webview.methods = { - reload = function (view, w) - view:reload() - end, + reload = function (view) view:reload() end, + stop = function (view) view:stop() end, -- Property functions get = function (view, w, k)