-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Less" pager on Linux closes Windows Terminal #13283
Comments
/feedback |
Hi there! |
I have the same problem with Vim (regular vim, not gvim), in Ubuntu 22.04 LTS. After the initial screen of Vim is visualized, the whole Windows Terminal session goes down without any message. I reported the problem on the Feedback Hub, but nobody cared to answer in any way: "WIndows Terminal preview is broken" My version of Windows Terminal Preview is: 1.14.1452.0. Vim is vim 8.2.5085, I recompile it almost every day. Anyway, the problem is present even using the distributed /usr/bin/vim 8.2.3995. |
@azc100 can you find the feedback you filed and share the link to it here? It's kinda hard to find them on the backend without that link 😕 FWIW I'm trying this out with my own Ubuntu 22.04 install over here, with Idly, I wonder if this is the same crash as #13250. I've got a build that has that PR already merged, so maybe that's why I'm not seeing it. |
I tried on my PC with less, and indeed it crashes. I don't know about #13250, it does not seem related (to me). Anyway, the problem actually happens if one edits (with vim) a file that is not empty. Just invoking "vim" (without specifying a file) works fine. The bypass is to use gvim instead... The very first invocation is painfully slow, but the further ones are OK. |
I bet it's under "Condividi", that looks like the "Share" button I'm only guessing it's related, because |
...got it: https://aka.ms/AAh8kuo
|
If I should test something locally, I will gladly do it. |
Hmm. The There's like, 3 OpenConsole's and 6 conhosts there though, so maybe one of them has something? I doubt it though, that crashing wouldn't bring down the Terminal. |
I tried to get a recording using Vim verbose option, but no file was produced at all, Windows Terminal just went away. |
I used the feedback app, but I don't use a Microsoft account, so Feedback did not give me a URL to paste. The behavior does not really "look" like a crash, the Terminal window just closes. I imagine it's as if Less is sending a control sequence that Terminal is interpreting as "Close Window" |
I agree with Charlweed, in the sense that Windows Terminals closes down, without even worrying about asking the user if it is OK to close all the active sessions. It just shuts down... |
That sounds like a crash to me 😉 |
...more like a hara-kiri. |
Okay, I can't repro this even on the 1.14.1451 commit. I might need someone who can repro it to help confirm if 94e1697 fixes it for them. For folks that are hitting this - Do you have any sort of screen reader running? Narrator, NVDA, JAWS, anything like that? I believe there are other things that try to use the UIA tree, but those are usually the most common |
I am not running any software of the above list (Narrator, etc.). I can generate the error (with Vim) very easily, not sure if the Feedback Hub recording could help... If the "hara-kiri" idea holds, one should check when the "close up everything" routine is invoked without a previous prompt for confirmation. If I have to try something locally, I am available. |
I reproduced the problem on my PC: see https://aka.ms/AAh8kuo |
oh ho ho, there was a stowed XAML exception after all! Looks like
That gives me more confidence that this is the thing that #13250 fixed |
I can look into Vim source files, if you tell me what to search for... The only active session under Windows Terminal was Ubuntu (22.04). There was not much else active on the PC, the Feedback Hub, the "cattura e annota" tool, and the usual bunch of system tasks that are usually running (the PC was connected to the Internet). |
I wouldn't be surprised if the screen capture tool invokes UIA. Magnifier and Cursor Highlighting are two other common tools. Unfortunately, it seems like there's not really a good way to try and figure out what invoked UIA 😕 I'd really doubt this is something specific to |
When will a release of Windows Terminal that does not break using Vim be available? Can I build it locally? It is rather annoying not being able to use Vim, especially since I use it everyday. I am presently forced to call it from MS-DOS or to run it on a real Linux PC... Thanks in advance. |
Hey the fix that I think fixed this shipped in Stable https://github.com/microsoft/terminal/releases/tag/v1.14.1861.0, Preview https://github.com/microsoft/terminal/releases/tag/v1.15.1862.0 - can you confirm that one of the |
Hi Mike,
Sorry for the delay in answering!
Yes, the problem is now gone with version 1.15.2003.0 of Windows Terminal
Preview (July 26, 2022) (not sure about the git version, I just got it from
the Microsoft Store).
Thanks for everything!
Antonio
|
Nice, thanks for confirming! |
Windows Terminal version
1.14.1451.0
Windows build number
10.0.19044.0
Other Software
OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2
Less version 551-1ubuntu0.1
Steps to reproduce
less /var/log/boot.log.1
Closes the window, if the count of lines in the file is more than a screen.
Similarly,
find ~/ -type f | less
Closes the window, if "find" returns more lines than fit on a screen.
Expected Behavior
The window should remain open.
Actual Behavior
When I use Windows Terminal and ssh to connect to remote linux machines, and I use the "less" pager to view a text file, the text is displayed on the terminal, and then the terminal window closes. It seems like Terminal closes after less prints its command prompt. Only the one connection window closes, other terminal windows remain open.
Other pagers (i.e. "more") do not close terminal. The less pager does not close the legacy "command prompt" window, nor the Conemu console.
This is a new issue, I have used Windows Terminal for quite a while, and this just started happening recently. I have not yet tested Terminal versions previous to 1.14.1451.0 for this issue.
The text was updated successfully, but these errors were encountered: