Add ctrl+f for review tool.
This commit is contained in:
+13
-3
@@ -18,6 +18,7 @@ const Browser = @import("Browser.zig");
|
||||
const Layouts = @import("Layouts.zig");
|
||||
const OpenLayoutDialog = @import("OpenLayoutDialog.zig");
|
||||
const Pane = @import("Pane.zig");
|
||||
const Review = @import("Review.zig");
|
||||
const SaveLayoutDialog = @import("SaveLayoutDialog.zig");
|
||||
const Settings = @import("Settings.zig");
|
||||
const SettingsDialog = @import("SettingsDialog.zig");
|
||||
@@ -1860,6 +1861,11 @@ fn focusedBrowser(self: *Window) ?*Browser {
|
||||
return tab.view.focusedBrowser();
|
||||
}
|
||||
|
||||
fn focusedReview(self: *Window) ?*Review {
|
||||
const tab = self.activeTab() orelse return null;
|
||||
return tab.view.focusedReview();
|
||||
}
|
||||
|
||||
/// Split the visible tab's focused pane, adding a pane of the given kind.
|
||||
fn addPane(self: *Window, kind: View.Kind) void {
|
||||
const tab = self.activeTab() orelse return;
|
||||
@@ -2126,10 +2132,14 @@ fn perform(self: *Window, action: shortcuts.Action) bool {
|
||||
|
||||
// Find-in-page, on the chord every browser uses. In a terminal Ctrl+F
|
||||
// is an ordinary control character that the program running there is
|
||||
// waiting for, so this only claims the key over a web pane.
|
||||
// waiting for, so this only claims the key over a pane holding a page.
|
||||
// Both kinds that do put up the same bar.
|
||||
.find => {
|
||||
const browser = self.focusedBrowser() orelse return false;
|
||||
browser.openFind();
|
||||
if (self.focusedBrowser()) |browser| {
|
||||
browser.openFind();
|
||||
} else if (self.focusedReview()) |pane| {
|
||||
pane.openFind();
|
||||
} else return false;
|
||||
},
|
||||
|
||||
.prev_tab => self.cycle(-1),
|
||||
|
||||
Reference in New Issue
Block a user