Multiple terminals instantiated, scrollback not working on invisible terminals - xtermjs

With multiple xterm.js terminals instantiated in the browser, each in a visible div at time of creation (so correctly sized and working), we send a command to each remote shell (e.g. history) and get the response correctly into each of the terminals. Only one terminal is visible at the time the return occurs. For the visible terminal, full scrollback works (assuming the response is > number of rows visible). For the invisible terminals, the response is cropped at the first visible line (so no scrollback capable).
Have tried different terminals being visible (first, middle, last) and only the visible terminal supports scrollback, all others crop at the top visible line. If one of the other terminals is made visible, and the command re-run (e.g. history), scrollback works fine (although never past the first visible line it showed before). If the command does not return line count > max visible lines then there is no need for scrollback (and hence no issue).
Is there any way to overcome this? It's not possible to focus each terminal as the information comes in as it could be in parallel.

Related

Mouse position offset while running Steam inside Weston

I installed and ran Steam inside Weston, when I enter Steam classic layout (not big screen), the mouse position is off where Steam thinks it's pointing at.
For example:
Here my cursor is not pointing at LIBRARY tab on the upper taskbar, however LIBRARY tab is highlighted, so Steam thinks my mouse is on LIBRARY:
enter image description here
And in settings window, it's the same, I am not pointing at the "Change" button but it is highlighted:
enter image description here
However, this problem only exists in upper taskbar, lower taskbar, and independently opened window like settings, in the middle part of Steam layout, including game list on the left, and details page of the game, cursor offset does not appear. In this picture, it shows the game name is highlighted correctly when my cursor is on it.
enter image description here
And if I open it in Big Screen mode, the problem does not appear:
enter image description here
Sorry for taking pictures from display directly because it's in a docker container and I can't correctly screenshot for many reasons. But I guarantee it's not the docker container's problem because if I ran weston&steam in a docker or directly in my local host, the same problem happened. So it should be the problem of whether weston or steam.
The cursor position is correct in the shell of and other apps running in the weston, so I think it's some wrong matching between Steam and weston, the problem is that I can't find why and where things go wrong.
I tried:
Inside Steam:
Running Steam without using weston, both in docker and out docker, it works fine.
Changing resolution (video dimensions) of Steam layout, turning off and on "Enlarge text and icons based on monitor size", "Enable smooth scrolling in web views", "Enable GPU accelerated rending in web views", "Enable hardware video decoding, if supported" in the Interface tab of settings. But it does not work.
Changing the display size for library user interface elements, it does not work.
Reading log:
Read kernel log, found no problem.
Read weston log, found some errors but running on local host also has same errors.
Read command line log, found no specific errors regarding steam layout.
Steam might not find or output cursor offset to log.
For weston:
I checked the log while starting to run weston, the resolution setting is the same as my desktop screen setting and steam setting, all are 1920x1080p. So should not be the problem of weston resolution.
I tried to add a weston.ini file to change the resolution, but failed due to seatd crash and then I felt no need for that because resolution is checked to be matched.
Inside .steam directory:
Checked same files between local host Steam folder and Steam folder in docker, either they are 100% the same, or the difference is just about timestamp. There are few files existing in docker but not on local host, I removed them and ran Steam, problem persists.
I also tried to locate the exact file where Steam layout is coded, but I didn't manage to find it.

What can I do if my program stops running at the begin statement and forces me to click run again?

I have tried debugging, but because I'm a beginner I can’t seem to find the problem. I have a feeling it has to do with the text highlighted in red.
This can happen if you have breakpoints from a previous session (or in the CPU window) and they are out of sync. This can also happen if you have shifted your code to a different drive or folder. They are not visible, but the debugger has to break at the nearest line.
To fix
Click on View / Debug / Breakpoints or Ctrl+Alt+B
Delete All Breakpoints
EDIT
The project.dsk file stores the breakpoints as an absolute path to the filename. If the project is shifted so that the drive or folder change, the breakpoints remain pointing to the non-existent file. From my experience, the IDE then compensates by breaking at the first line of the project.

Windows appearing off edge of screen (Delphi)

Windows in my application are popping up off the edge of the screen, and this of course is a problem because some of the windows are modal and can't be dismissed (you don't even know they are there).
I'm using the TurboPower Orpheus component which remembers the location and size of each form, then restores it when the form is shown again. It saves the size and placement in an INI file.
What can I do to prevent windows from ever showing off the side of the screen?
It's common for this sort of thing to happen if you use multiple monitors and then disconnect one, such as when undocking a laptop. Or if you dock a laptop to a screen with a higher resolution. Or use remote desktop, etc..
The remedy is to override the "remember my position" behavior with a sanity check, to see if the left+width exceeds the width of the screen (Screen.Monitors array, actually - thanks guys), and vice-versa for the top+height.
Ideally, you "bump" by subtracting the difference, so you're butting up against the edge that the window wanted to straddle.
Also, see if there are updates to Orpheus that fix this. If not, you can get the source, make the correction (optional), and contribute it back to the project. It's OSS, as I recall.
You may want to give a look at their DefaultMonitor property and read the code from TCustomForm.SetWindowToMonitor to see how to deal with positioning relatively to Screen.Monitors.
Use DefaultMonitor to associate a form with a particular monitor in a multi-monitor application. The following table lists the possible values:
Value Meaning
dmDesktop No attempt is made to position the form on a specific monitor.
dmPrimary The form is positioned on the first monitor listed in the global screen object's Monitors property.
dmMainForm The form appears on the same monitor as the application's main form.
dmActiveForm The form appears on the same monitor as the currently active form.
Note: DefaultMonitor has no effect if the application does not have a main form.
To recall the previous position of a form, without having it suddenly in an area which is no longer available (due to a plugged off screen or changed resolution), you just call
TForm.MakeFullyVisible;
That's it. See the documentation.

Vista, inifiles, and run at startup oddities... what the heck

I've got something happening with a little app that I made that I don't understand what the problem is. The app is just a little texted panel clock that sits above the taskbar on the second monitor. Settings are saved via inifile in the proper appdata folder, and the specs are saved properly, i.e. X and Y location, font, font style, etc.
I wanted it to run automatically when Windows boots up, so yesterday I just dragged a shortcut to the Start | Programs | Startup folder. This morning when booting up, for a moment, it loaded in the proper location, then quickly moved itself back to 0 by 0 on the X-Y plane. I looked at the inifile, and sure enough... it's Top=1133 Left=1920, just like it is supposed to be, yet windows starts it at Top=0 Left=0.
What the heck?...
Check that you have the 'position=poDesigned' as well. If you dont, it will use that setting preferentially. If this is ok, put a fixed offset in your X&Y properties to see if that is where it is defaulting to. Ideally you should be setting your desired XY position no earlier than AfterCreation, do it in FormCreate if you can because by that time the form is all yours to play with.
Brian.

Why is TextMate treating two spaces as a single character?

When I enter two spaces into TextMate 1.5.7, under certain circumstances it seems to treat the two spaces as a single character..
For example when typing ("[space][space]")
(" |")
\_ the cursor
If I then press backspace, both spaces get deleted, and if I press the left arrow it jumps both spaces (which is surprisingly annoying)
It's nothing to do with my soft-tabs setting (which is set to 4 space soft-tab).. Has anyone else noticed this?, or is it something strange with my configuration (unlikely as it happened with a clean install, on a new OS install)?
I've since updated to v1.5.8, and the issue remains.
The double spacing is caused by soft tabs. At the bottom of Textmate where the column indicator, line indicator, file type, and tab size indicators are, click on the soft tabs drop down and click soft tabs to turn it off.
Consider that textmate is an editor for programmers. in most programming languges the number of spaces doesn't matter, so it doesn't seem to me that strange.
Anyway, I use 1.5.8 and I don't have this problem. I also looked in the configuration window and I can't see anything about it.

Resources