一旦jLine将一行写到shell中,我们就无法返回到原始行 [英] Once jLine writes over one line to shell, we can't go back to original line

查看:103
本文介绍了一旦jLine将一行写到shell中,我们就无法返回到原始行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我遇到了jLine的以下问题.我们打开命令提示符(Linux和Windows),并输入字母流,直到它溢出".移至下一行.例如:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aa

然后,我们尝试删除输入的文本,但是光标将不会返回到第一行,而是保持在第二行的开头.这是一个视觉问题,而不是逻辑问题,因为通过打印出调试消息并按"enter"(输入)按钮,可以解决问题.我可以看到缓冲区在所有删除之后都包含字符串.

如果有人可以帮助我弄清楚为什么会发生这种情况以及如何解决这种情况,将不胜感激.

谢谢,
Jonathan

Hello,

I''ve encountered the following problem with jLine. We open the command prompt (both linux and windows) and enter a stream of letters until it "spills" over to the next line. for example:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aa

We then try to delete the entered text, however the cursor will not go back up to the first line and it will remain on the start of the second line. This is a visual issue and not a logic one, since by printing out debug message and by pressing "enter" i can see that the buffer contains the string after all the deletions.

If anyone can help me figure out why this happens and how this can be resolved, it would be greatly appreciated.

Thanks,
Jonathan

推荐答案

我最近遇到一个与客户相同的问题,该客户试图使用这种不间断的乱码来使打印布局无效. >
这是无效的情况.
解释的情况仅在行中没有中断/空格时才会发生.

但这在现实生活中不会发生,没有那么长的话.

最长的单词@ Wikipedia [ ^ ]





这是JLine项目中的常见错误:
项目Bug跟踪程序中的错误报告 [
I recently had this same problem with a customer who tried to use such a non-break-gabbish to void the print layout.

This is a non valid situation.
The explained situation only happens when there are no breaks/spaces in the line.

But that does not happen in real life, there is no word that is so long.

longest Words @ wikipedia[^]





This is a common bug in the JLine Project:
Bug Report at projects Bug Tracker[^]


谢谢您的回答!我不知道我怎么想念那个.顺便说一句,我的经验在jline 2.7中解决了这个问题
Thanks for the answer! I have no idea how I missed that one. BTW The issue is solved in jline 2.7 by my experience


这篇关于一旦jLine将一行写到shell中,我们就无法返回到原始行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆