Branch: refs/heads/master
Home: https://github.com/tmux/tmux
Commit: c3e38b317d47c667e9132b5f2785cf71cb4b92c4
https://github.com/tmux/tmux/commit/c3e38b317d47c667e9132b5f2785cf71cb4b92c4
Author: Yayo Razo <[email protected]>
Date: 2026-07-13 (Mon, 13 Jul 2026)
Changed paths:
M compat.h
R compat/fgetln.c
M configure.ac
M prompt-history.c
Log Message:
-----------
fix(compat): drop fgetln compat shim, migrate prompt-history.c to getline
Following up on the comment on #5365 - this drops fgetln from
prompt-history.c (its only remaining caller) in favor of getline, and
removes the fgetln compat shim entirely since nothing references it
anymore: the compat.h declaration, compat/fgetln.c itself, and its
entry in configure.ac's AC_REPLACE_FUNCS list.
fgetln doesn't null-terminate its returned buffer when the final line
in the file lacks a trailing newline, so the old loop had a second
branch to heap-copy and manually terminate that case. getline always
null-terminates regardless, so that branch goes away and the loop
becomes uniform.
Verified with a real build (ubuntu-24.04 container, same
--enable-utf8proc --enable-asan configure CI uses): crafted a history
file with a normal entry, a blank line, and a final entry with no
trailing newline at EOF (the exact case the removed branch existed
for), loaded it through a real ASan-built tmux via show-prompt-history,
all three entries came back correctly. Full regress suite is otherwise
clean against this change.
Commit: 2818069d5f1777a363951d96f58f9a2034474cb1
https://github.com/tmux/tmux/commit/2818069d5f1777a363951d96f58f9a2034474cb1
Author: Nicholas Marriott <[email protected]>
Date: 2026-07-13 (Mon, 13 Jul 2026)
Changed paths:
M compat.h
R compat/fgetln.c
M configure.ac
Log Message:
-----------
Merge pull request #5389 from YayoRazo/fix/prompt-history-getline
fix(compat): drop fgetln compat shim, migrate prompt-history.c to getline
Compare: https://github.com/tmux/tmux/compare/2f0308ea4dad...2818069d5f17
To unsubscribe from these emails, change your notification settings at
https://github.com/tmux/tmux/settings/notifications
--
You received this message because you are subscribed to the Google Groups
"tmux-git" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion, visit
https://groups.google.com/d/msgid/tmux-git/tmux/tmux/push/refs/heads/master/2f0308-281806%40github.com.