Comments (6)
This is "basically" intended behavior -- the predicted cells are
updated to deal with the CR and the innocent bystanders are left to be
updated by the server.
But much better would be to only show the new prediction after the new
epoch (post-CR) is confirmed. Right now only cursor movements are
versioned into epochs; for cell predictions we only keep the most
recent prediction epoch.
So my plan here is to also store a list of overlay epochs to fix this.
If done right this will also fix related problems where if you press
"backspace" fast enough, you can backspace past the entire prompt even
if the RTT is fast. (Because each backspace makes a new epoch so we
never have a chance to verify the accuracy of the old epoch and see
that it was wrong...)
On Thu, Feb 9, 2012 at 4:16 PM, Anders Kaseorg
[email protected]
wrote:
If I press Enter after
(Last line of output from the previous command) andersk@dr-wily:~$ echo hello_at the bottom of the screen, mosh temporarily shows the following prediction:
(Last line of output from llo andersk@dr-wily:~$ echo hello_
Reply to this email directly or view it on GitHub:
#6
from mosh.
Maybe there could be a special case: "if enter is pressed while on the bottom line mosh treats it like a carriage return without a line feed" (maybe even clearing the line)?
This particular prediction glitch happens constantly, and I will claim is the most obvious thing that makes one realize they are "in the matrix" and are not using a "real" terminal: every single command typed into the shell (as you will pretty much always be at the bottom row of the screen) causes this glitch. It would be one thing if this was something that happened only every now and then, but I find myself staring at this glitch more than I find myself doing any actual work.
In other applications, it is simply brutal: if you are in an IRC client, such as irssi, this glitch temporarily destroys the status bar (which is rendered above the text input line) every single time you hit enter, and you have to wait for it to resynchronize to fix it. (I will also point out that I'm not the only person who noticed this more severe glitch while using irssi: in fact, I hadn't gotten mosh working well enough to even use irssi yet by the time a couple of my friends reported the status bar flashing.)
from mosh.
Well, you are of course right that it's annoying (and that's part of why we only use predictions on long-latency links and to smooth out glitches, not for everybody).
I've experimented with some other options (clearing the predictions completely, not clearing the predictions), and they all have seemed worse to me in actual usage, but I am open to ideas. I do think simply versioning the cell predictions (as we already do for cursor predictions to great success) is the solution here.
I would make a distinction between what happens at the shell (which is a correct prediction, although it is jarring for the user to see it "before its time") versus what happens in irssi (where mosh is just wrong in predicting that the screen will scroll), but maybe this is irrelevant.
from mosh.
The prediction at the shell isn't right, though, because of the way the synchronization occurs: while the line does "move up", it does not end up at the line directly above the cursor, and the synchronization algorithm redraws all of the content above before fixing that. That is what is meant by the "(Last line of output from llo" description in the original issue: the glitch that you see is that just a few characters from the end of your command (not the entire line, which would be more reasonable) get moved up by a line, the output of your command appears (as expected, but truncated at the position of the gitch), and only afterwards does the random weird floating prediction of the last few characters from your command disappear and get replaced by the real output.
from mosh.
Fair enough. Let me experiment more with this and maybe we can make a temporary change before we have full versioned cell predictions.
If you want to experiment, try commenting out the part of PredictionEngine::newline_carriage_return() between line 765 (for ( overlays_type::iterator i = overlays.begin();) and the comment on line 778 (make blank prediction for last row).
from mosh.
I tried that, and the difference is like night and day: there are no more glitches in either bash or irssi, and suddenly I feel like I've exited the matrix! ;P Thank you so much for that suggestion: you just made my day, this is downright epic.
from mosh.
Related Issues (20)
- VT100 DECKPAM - Alternate Keypad Mode HOT 1
- "Did not find mosh server startup message" when connecting to a busybox ash shell (embedded device) HOT 2
- Symbol not found: ___darwin_check_fd_set_overflow on Mojave
- Combining character not appearing over mosh (but it does over ssh) HOT 3
- mosh crashes with -6 IPv6
- Mosh
- Wrote a launcher for mosh-client and mosh-server for Windows
- Bad configuration option: usekeychain HOT 2
- Mac OS: Library not loaded libprotobuf.23.4.0.dylib HOT 4
- Feature request: undercurl support
- Home/End keys not working on a urxvt terminal under mosh HOT 5
- Text doesn't get to clipboard with `tmux load-buffer -w`
- Synchronized Output (DEC private mode 2026) support
- Mobile
- Introduce configuration file HOT 2
- Mosh unexpectedly shutting down (client side) on OSX HOT 5
- latest protobuf version mismatches with mosh-server 1.4.0 HOT 1
- Altivec code in `crypto/ocb_internal.cc` fails to compile, needs to use `__vector` instead of `vector` HOT 15
- HelloGitHub Badge
- network-no-diff test is broken for both 1.4.0 regression build and head build
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mosh.