Skip to content

Commit 2a1dda8

Browse files
src: Fix terminal resize event processing
The fix ensures each complete line in the control buffer is processed exactly once by passing the correct line start position to the processing function and properly null-terminating each line. Signed-off-by: Sohan Kunkerkar <sohank2602@gmail.com>
1 parent 4d374fd commit 2a1dda8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ctrl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ static gboolean read_from_ctrl_buffer(int fd, gboolean (*line_process_func)(char
187187
char *newline = strchrnul(beg, '\n');
188188
/* Process each message which ends with a line */
189189
while (*newline != '\0') {
190-
if (!line_process_func(ctlbuf))
190+
if (!line_process_func(beg))
191191
return G_SOURCE_CONTINUE;
192192

193193
beg = newline + 1;

0 commit comments

Comments
 (0)