if mouse hide setting changes to false, show mouse immediately

This commit is contained in:
Mitchell Hashimoto
2023-09-14 19:54:28 -07:00
parent 54f58d9cd2
commit a5a93013b3

View File

@ -571,6 +571,11 @@ fn changeConfig(self: *Surface, config: *const configpkg.Config) !void {
self.config.deinit(); self.config.deinit();
self.config = derived; self.config = derived;
// If our mouse is hidden but we disabled mouse hiding, then show it again.
if (!self.config.mouse_hide_while_typing and self.mouse.hidden) {
self.showMouse();
}
// We need to store our configs in a heap-allocated pointer so that // We need to store our configs in a heap-allocated pointer so that
// our messages aren't huge. // our messages aren't huge.
var renderer_config_ptr = try self.alloc.create(Renderer.DerivedConfig); var renderer_config_ptr = try self.alloc.create(Renderer.DerivedConfig);