CR/NL TTY Race Condition ?
Bug report
Thanks for filing an issue! Please answer the questions below so I can help you.
- iTerm2 version: 3.4.4
- OS version: macOS Mojave (10.14.6)com.googlecode.iterm2.plist
- Attach
~/Library/Preferences/com.googlecode.iterm2.plist
here (drag-drop from finder into this window) - Attach a debug log, if possible.
File is too big (14.12MiB). See: https://dabe.com/misc/20210408-iTerm2-debuglog.txt
- Attach a screen capture video if it would make the reproduction steps clearer.
PLEASE ATTACH YOUR PLIST FILE FOR BUG REPORTS! Seriously! I'll probably ask you for it if you don’t.
Detailed steps to reproduce the problem
Basically I'm trying to capture whether vim
is complaining about a file being out-of-sync from its ".swp" file.
Here's a pretty repeatable recipe: [Note, this is slightly different from the debug log, but you should be able to get the idea...]
-
vi /tmp/new
to run the bog-standardvim
that comes with macOS -
:w
to write the [empty] contents -
CTRL-Z
to suspendvim
-
kill -KILL %1
to kill the process and leave the.swp
file in place vi -re /tmp/.new.swp -c 'q!' | while read i; do printf "%d bytes\n" "${#i}"; done
What happened
Most of the time, the first few lines end up in a stair-step pattern. When I was piping through a perl script, it was more fickle as to when it would behave and when it would "feed [the paper by a] line" and when it would "return [the typewriter] carriage" — most likely due to a timing condition.
You can see in the linked debuglog.txt
that the first two times I ran it, it looked okay, but the third time was wonky... I'm hopeful you'll be able to see the difference between a "good" run and a "bad" one. «shrug»
What should have happened
Everything should be flush against the left-hand margin.
This isn't urgent, of course, but I would be remiss if I didn't at least document it... :-D
Cheers,
-- :- Dabe