You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This was previously discussed at #133, we still have some problems with mtr compatibility.
The following content is copied from #133 posted by @mzz2017 :
After the fix PR #132, we found that in different mtr display modes, nali still has exceptions.
To reproduce it, try:
> mtr baidu.com | nali
# and then press d to switch the display mode
At the beginning, we fixed it by scanning control runes (rune<0x20). Although it fixed the most problems, we found there was also some abnormal cursor jitter.
Finally, we think we shouldn't use bufio because it uses cache to delay reads. We should unblock as soon as the write finish on the other side of the pipe ends, and return the read result, process it and print it on the screen, which is what our PR does.
This was previously discussed at #133, we still have some problems with mtr compatibility.
The following content is copied from #133 posted by @mzz2017 :
After the fix PR #132, we found that in different mtr display modes, nali still has exceptions.
To reproduce it, try:
At the beginning, we fixed it by scanning control runes (rune<0x20). Although it fixed the most problems, we found there was also some abnormal cursor jitter.
Finally, we think we shouldn't use bufio because it uses cache to delay reads. We should unblock as soon as the write finish on the other side of the pipe ends, and return the read result, process it and print it on the screen, which is what our PR does.
Currently we have the following problems:
If we use
io.Copy
to replacebufio
, there will be potential IP truncation and the IP will not be recognized.fix: we should not use bufio and to keep read and write behavior consistent #133 (comment)
@mzz2017 mentioned that some kind of cache could be added to solve this.
fix: we should not use bufio and to keep read and write behavior consistent #133 (comment)
If we continue to use
bufio
, we may need to add additional control character scans to solve the cursor jitter problem in tui.fix: we should not use bufio and to keep read and write behavior consistent #133 (comment)
Maybe we can add an arg like
--mode tui
to specifically be compatible with tui programs like mtr.fix: we should not use bufio and to keep read and write behavior consistent #133 (comment)
The current scanning method is to splite text by
\n
and\r
characters, but when encountering super-long input without newline characters, nali will freeze.fix: we should not use bufio and to keep read and write behavior consistent #133 (comment)
The text was updated successfully, but these errors were encountered: