surface: store entire scroll-to-bottom struct
parent
2490171304
commit
87056a2600
|
|
@ -272,7 +272,7 @@ const DerivedConfig = struct {
|
||||||
title_report: bool,
|
title_report: bool,
|
||||||
links: []Link,
|
links: []Link,
|
||||||
link_previews: configpkg.LinkPreviews,
|
link_previews: configpkg.LinkPreviews,
|
||||||
scroll_to_bottom_on_keystroke: bool,
|
scroll_to_bottom: configpkg.Config.ScrollToBottom,
|
||||||
|
|
||||||
const Link = struct {
|
const Link = struct {
|
||||||
regex: oni.Regex,
|
regex: oni.Regex,
|
||||||
|
|
@ -341,7 +341,7 @@ const DerivedConfig = struct {
|
||||||
.title_report = config.@"title-report",
|
.title_report = config.@"title-report",
|
||||||
.links = links,
|
.links = links,
|
||||||
.link_previews = config.@"link-previews",
|
.link_previews = config.@"link-previews",
|
||||||
.scroll_to_bottom_on_keystroke = config.@"scroll-to-bottom".keystroke,
|
.scroll_to_bottom = config.@"scroll-to-bottom",
|
||||||
|
|
||||||
// Assignments happen sequentially so we have to do this last
|
// Assignments happen sequentially so we have to do this last
|
||||||
// so that the memory is captured from allocs above.
|
// so that the memory is captured from allocs above.
|
||||||
|
|
@ -2282,7 +2282,7 @@ pub fn keyCallback(
|
||||||
try self.setSelection(null);
|
try self.setSelection(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (self.config.scroll_to_bottom_on_keystroke) try self.io.terminal.scrollViewport(.bottom);
|
if (self.config.scroll_to_bottom.keystroke) try self.io.terminal.scrollViewport(.bottom);
|
||||||
|
|
||||||
try self.queueRender();
|
try self.queueRender();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue