Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Rendering issues with SSH, Vim, Neovim, etc.

Aug
197
5
First, please forgive me if this is an issue already covered, but it seems I can't search the forums for anything. I did notice a post on that subject, so maybe that's why?

Whatever the case, I'm the type of user who sits in a shell for far too much of the day, which probably explains why I'm such a long-term TakeCommand/FrontRunner/4NT/4DOS user in the first place. For anything I'm doing in Windows on my own system, I prefer TakeCommand by leaps and bounds over CMD, PowerShell, etc. for all sorts of reasons. My main obstacle with the program is the rendering issues that regularly plague me when using character-mode applications like SSH, Vim, Neovim, etc.

With SSH, I seem to get these regular "off-by-one" sorts of errors that cause all the text in my session to be messed up by what looks like a line-ending character, staggering subsequent lines of text. And exiting the connection leaves me with a thoroughly broken TakeCommand display that not even "cls" will fix. I have to exit the app and restart to get back to a working state. I have similar issues with Vim from time to time, though they're equally intermittent.

Today I was in the process of migrating to Neovim and discovered that anything involving a floating window effectively hoses the entire viewing area (see the screenshot attached) 100% of the time. That's what I see if I simply execute the ":Lazy" command in Neovim to show the status of my plugins. For the record, I don't have any of these problems with the very same set of software when I run them from within CMD or PowerShell, so I'm fairly confident it's some kind of rendering issue specific to TakeCommand.

Despite being such a long-term user, I'm not sure how to troubleshoot or fix such issues. Could somebody maybe point me in the right direction? Thanks!
 

Attachments

  • 2024-09-21 11_08_15-TCC Prompt - nvim.webp
    2024-09-21 11_08_15-TCC Prompt - nvim.webp
    8.7 KB · Views: 12
Take Command typically runs TCC.EXE in a hidden console and reproduces what goes on in that hidden console. CMD and Powershell run in a (visible) Windows console or in Windows Terminal. How does it work if you run TCC.EXE in either of those environments (and not in TakeCommand)? Just find TCC.EXE in Explorer and 2-click on it ... then try SSH.
 
First, thanks for that answer and explanation! I never knew how Take Command did its wizardry, which is a tad embarrassing to admit seeing as I've been developing virtually every sort of app imaginable for Windows since the late 80s. Second, I guess the good news is that TCC handles everything I've tried so far like a total champ! It never even occurred to me to try it, but it seems to display the same rock-solid behavior as CMD and PowerShell. I'll have to use that for a while and see if it demonstrates any of the intermittent issues I see in TakeCommand.

I guess that means the problem is in whatever gizmo-whatsit-who's-a-thingy-magic that Take Command uses to reproduce what TCC is doing?
 
With SSH, I seem to get these regular "off-by-one" sorts of errors that cause all the text in my session to be messed up by what looks like a line-ending character, staggering subsequent lines of text. And exiting the connection leaves me with a thoroughly broken TakeCommand display that not even "cls" will fix.

Have you tried cls /c ? (As a workaround, not a solution, of course.)
 
This is a known VIM problem. The issue is that Vim cannot handle non-"standard" window sizes, so if you have a TCMD tab window with something like 38 rows x 157 columns, Vim garbles the display. (The same thing happens in a stand-alone console window of that size.)

The only workaround pending a fix by the Vim developers is to size your TCMD tab windows in such a way that Vim can handle it.
 
This is a known VIM problem. The issue is that Vim cannot handle non-"standard" window sizes...
With respect, I don't think that's true. If I start Vim in a small TCC window, a medium sized window, a large window--any sized window, in fact--it adapts just fine. The same is true if I start it in CMD instead. The only time I get the display garbling is in TakeCommand. Since others helpfully suggested I use TCC instead of TakeCommand, I've been doing that at work for the last few days, and I haven't experienced a single such rendering problem no matter what size I make the window. For the record, TakeCommand seems to handle Neovim better than Vim save for its "floating windows", which are pure garbage every time. And for reference, TCC is rock-solid by comparison with Neovim as well.
 
TCMD is using a hidden console window (which it then reads and paints o the TCMD tab window). If that hidden console is not sized appropriately, Vim garbles its output. What you see in the TCMD window is exactly what's happening in the hidden console. Detach the tab (which unhides the window) and see what the output looks like there.
 
TCMD is using a hidden console window (which it then reads and paints o the TCMD tab window). If that hidden console is not sized appropriately, Vim garbles its output. What you see in the TCMD window is exactly what's happening in the hidden console. Detach the tab (which unhides the window) and see what the output looks like there.
Fascinating. I didn't even know I could do that. But for what it's worth, I'll post a couple screenshots to show what I see in TakeCommand versus what I see when I detach the tab. As you can see, the output in TakeCommand is pure garbage, whereas it looks exactly as it should with the tab detached.
 

Attachments

  • 2024-09-25 19_32_20-TakeCommand.webp
    2024-09-25 19_32_20-TakeCommand.webp
    37.8 KB · Views: 15
  • 2024-09-25 19_32_36-TabDetached.webp
    2024-09-25 19_32_36-TabDetached.webp
    91.6 KB · Views: 15
This thread is getting confused -- you're referring to several different programs, which do not behave the same way under TCC and/or TCMD.

First, Vim will definitely garble your output when run as a console app from TCC (or CMD) if you resize it a few times (i.e., smaller then larger). And it is not happy with non-standard console window sizes. NeoVim seems to work somewhat better, though I was able to garble it one time.

I can't test your example of using the :Lazy command, because NeoVim complains that isn't a command. I presume it must be a plugin from somewhere?

Both Vim and NeoVim are switching to an alternate console buffer to do their drawing and then switching back to the default one when they exit. TCMD can normally detect & handle this (though Vim doesn't do it quite right sometimes and puts the cursor in the middle of the page instead of its previous location).
 
You might be able to figure it out witj WMIQUERY. Question: Does anyone know if there's a syntax for the likes of DeviceId=0 or 1 or 2?

Code:
v:\> wmiquery /a root\Microsoft\Windows\Storage "select DiskNumber,DriveLetter from MSFT_Partition where DriveLetter!=0"
DiskNumber = 0
DriveLetter = 67

DiskNumber = 1
DriveLetter = 68

DiskNumber = 2
DriveLetter = 70


v:\> wmiquery /a root\Microsoft\Windows\Storage "select DeviceId,BusType from MSFT_PhysicalDisk where DeviceId<3"
BusType = 7
DeviceId = 2

BusType = 8
DeviceId = 1

BusType = 8
DeviceId = 0
 
Back
Top