mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-14 03:25:50 +00:00
refactor: remove unused stream handler scroll-to-bottom code
The renderer approach doesn't need termio changes. Co-Authored-By: Sachin <sachinbeniwal0101@gmail.com>
This commit is contained in:
committed by
Mitchell Hashimoto
parent
e197b95c32
commit
263469755c
@@ -1076,8 +1076,6 @@ pub fn handleMessage(self: *Surface, msg: Message) !void {
|
||||
}, .unlocked);
|
||||
},
|
||||
|
||||
.report_color_scheme => |force| self.reportColorScheme(force),
|
||||
|
||||
.present_surface => try self.presentSurface(),
|
||||
|
||||
.password_input => |v| try self.passwordInput(v),
|
||||
|
||||
@@ -166,7 +166,6 @@ pub const DerivedConfig = struct {
|
||||
clipboard_write: configpkg.ClipboardAccess,
|
||||
enquiry_response: []const u8,
|
||||
conditional_state: configpkg.ConditionalState,
|
||||
scroll_to_bottom: configpkg.Config.ScrollToBottom,
|
||||
|
||||
pub fn init(
|
||||
alloc_gpa: Allocator,
|
||||
@@ -208,7 +207,6 @@ pub const DerivedConfig = struct {
|
||||
.clipboard_write = config.@"clipboard-write",
|
||||
.enquiry_response = try alloc.dupe(u8, config.@"enquiry-response"),
|
||||
.conditional_state = config._conditional_state,
|
||||
.scroll_to_bottom = config.@"scroll-to-bottom",
|
||||
|
||||
// This has to be last so that we copy AFTER the arena allocations
|
||||
// above happen (Zig assigns in order).
|
||||
@@ -303,7 +301,6 @@ pub fn init(self: *Termio, alloc: Allocator, opts: termio.Options) !void {
|
||||
.enquiry_response = opts.config.enquiry_response,
|
||||
.default_cursor_style = opts.config.cursor_style,
|
||||
.default_cursor_blink = opts.config.cursor_blink,
|
||||
.scroll_to_bottom_on_output = opts.config.scroll_to_bottom.output,
|
||||
};
|
||||
|
||||
const thread_enter_state = try ThreadEnterState.create(
|
||||
|
||||
@@ -56,9 +56,6 @@ pub const StreamHandler = struct {
|
||||
/// The clipboard write access configuration.
|
||||
clipboard_write: configpkg.ClipboardAccess,
|
||||
|
||||
/// The scroll-to-bottom behavior configuration.
|
||||
scroll_to_bottom_on_output: bool,
|
||||
|
||||
//---------------------------------------------------------------
|
||||
// Internal state
|
||||
|
||||
@@ -115,7 +112,6 @@ pub const StreamHandler = struct {
|
||||
self.enquiry_response = config.enquiry_response;
|
||||
self.default_cursor_style = config.cursor_style;
|
||||
self.default_cursor_blink = config.cursor_blink;
|
||||
self.scroll_to_bottom_on_output = config.scroll_to_bottom.output;
|
||||
|
||||
// If our cursor is the default, then we update it immediately.
|
||||
if (self.default_cursor) self.setCursorStyle(.default) catch |err| {
|
||||
@@ -580,11 +576,6 @@ pub const StreamHandler = struct {
|
||||
// Small optimization: call index instead of linefeed because they're
|
||||
// identical and this avoids one layer of function call overhead.
|
||||
try self.terminal.index();
|
||||
|
||||
// If configured, scroll to bottom on output so the user sees new content
|
||||
if (self.scroll_to_bottom_on_output) {
|
||||
try self.terminal.scrollViewport(.bottom);
|
||||
}
|
||||
}
|
||||
|
||||
pub inline fn reverseIndex(self: *StreamHandler) !void {
|
||||
|
||||
Reference in New Issue
Block a user