mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 08:46:08 +03:00
inspector: always increment seq number for vt events
This commit is contained in:
@ -111,6 +111,11 @@ pub const VTHandler = struct {
|
|||||||
pub fn handleManually(self: *VTHandler, action: terminal.Parser.Action) !bool {
|
pub fn handleManually(self: *VTHandler, action: terminal.Parser.Action) !bool {
|
||||||
const insp = self.surface.inspector orelse return false;
|
const insp = self.surface.inspector orelse return false;
|
||||||
|
|
||||||
|
// We always increment the sequence number, even if we're paused or
|
||||||
|
// filter out the event. This helps show the user that there is a gap
|
||||||
|
// between events and roughly how large that gap was.
|
||||||
|
defer self.current_seq +%= 1;
|
||||||
|
|
||||||
// If we're pausing, then we ignore all events.
|
// If we're pausing, then we ignore all events.
|
||||||
if (!self.active) return true;
|
if (!self.active) return true;
|
||||||
|
|
||||||
@ -128,12 +133,10 @@ pub const VTHandler = struct {
|
|||||||
const alloc = self.surface.alloc;
|
const alloc = self.surface.alloc;
|
||||||
var ev = try VTEvent.init(alloc, self.surface, action);
|
var ev = try VTEvent.init(alloc, self.surface, action);
|
||||||
ev.seq = self.current_seq;
|
ev.seq = self.current_seq;
|
||||||
self.current_seq +%= 1;
|
|
||||||
errdefer ev.deinit(alloc);
|
errdefer ev.deinit(alloc);
|
||||||
|
|
||||||
// Check if the event passes the filter
|
// Check if the event passes the filter
|
||||||
if (!ev.passFilter(self.filter_text)) {
|
if (!ev.passFilter(self.filter_text)) {
|
||||||
self.current_seq -= 1;
|
|
||||||
ev.deinit(alloc);
|
ev.deinit(alloc);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user