]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.2.0412: channel: term_start() out_cb/err_cb no longer deliver raw chunks v9.2.0412
authorHirohito Higashi <h.east.727@gmail.com>
Tue, 28 Apr 2026 21:03:12 +0000 (21:03 +0000)
committerChristian Brabandt <cb@256bit.org>
Tue, 28 Apr 2026 21:06:45 +0000 (21:06 +0000)
commit41c3379bdf944dcee7f64b8e95094c03e2dce968
treeec5fe560a32393514f65f16ce7c1a37b7fcce604
parente7745b7cbf8fa4433083d2565af72e9ffca5026d
patch 9.2.0412: channel: term_start() out_cb/err_cb no longer deliver raw chunks

Problem:  channel: term_start() out_cb/err_cb no longer deliver raw
          chunks (regression from patch 9.2.0224, breaks callers like
          vim-fugitive that parse multi-line output)
          (D. Ben Knoble, after v9.2.0224)
Solution: Remove the PTY-specific per-line splitting in
          may_invoke_callback() so RAW callbacks again receive the
          raw chunk as returned by read(), preserving embedded NL.
          If per-line handling is desired, the callback must split
          "msg" on NL and strip the trailing CR itself; document
          this behavior in term_start().  Replace
          Test_term_start_cb_per_line() with
          Test_term_start_cb_raw_chunk() to verify the raw-chunk
          contract.

fixes:  #20041
closes: #20045

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Yasuhiro Matsumoto <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/doc/channel.txt
runtime/doc/terminal.txt
src/channel.c
src/testdir/test_channel.vim
src/version.c