summaryrefslogtreecommitdiff
path: root/src/buffer_utils.hh
diff options
context:
space:
mode:
authorJohannes Altmanninger <aclopte@gmail.com>2024-11-23 10:54:35 +0100
committerMaxime Coste <mawww@kakoune.org>2024-11-28 08:09:30 +1100
commit658915086fc4883c45f1af98f1b37a01822e9feb (patch)
tree0fc29916c14bccfc0305736231f3594113a8138f /src/buffer_utils.hh
parent5d378fa3a5139ca7c075ddf1a533856f53943f73 (diff)
Fix BufReadFifo overlapping range on partial line
As reported in [1], when reading from a fifo a buffer that is not newline-terminated, we add a newline automatically, and include that in the range reported to BufReadFifo. I'm not 100% sure if this is really wrong but since the typical consumer of BufReadFifo does something like select %val{hook_param} exec |grep foo<ret> it seems safe to remove this newline; doing so means that 1. "grep foo" will no longer see a newline in stdin, which seems good. 2. Kakoune will strip a trailing newline from the command output, since the input didn't have one. So the input is the same. Let's remove any artificially-added newline from the hook parameter. [1]: https://lists.sr.ht/~mawww/kakoune/%3CZzXjfXnETd2gbeXa@thristian.org%3E
Diffstat (limited to 'src/buffer_utils.hh')
0 files changed, 0 insertions, 0 deletions