GNU screen鼠标限制

4

我的典型开发环境是在全屏终端(通常是gnome-terminal)中运行带有vim的GNU screen会话。 我遇到的问题是,当在vim中单击超过大约第223个字符的字符时,鼠标指针无法正确解释。

我尝试了另一个问题的解决方案(将set ttymouse=sgr添加到我的.vimrc),这解决了直接在终端中运行vim的问题,但在screen会话中使用vim时仍存在鼠标限制。

1个回答

5

在寻找GNU screen sgr支持时,我发现了一个补丁!以下是我用于将补丁应用于Ubuntu 14.04上的screen的步骤。(我修改了该补丁以使其适用于从此处下载的源文件)

  1. Pull down the screen source from apt-get:

    apt-get source screen
    
  2. cd into the source directory and install the patch:

    patch -p1 < screen-sgr-patch.diff
    
  3. Integrate local changes made by the patch:

    dpkg-source --commit
    
  4. Build the new .deb files:

    dpkg-buildpackage -us -uc
    

    (NOTE: it may complain about missing build dependencies but just install any of them using apt-get and run dpkg-buildpackage again)

  5. Install the patched screen package (you'll find this beside the source directory):

    dpkg -i screen_<version>_<arch>.deb
    

我不确定为什么这个补丁没有被合并到屏幕中,但是到目前为止我使用它没有遇到任何问题。 - Chisholm
只要你知道,你可以随时向管理员举报,让他们取消你的回答的社区维基状态。(尽管可能需要很长时间才能更改) - FDinoff

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接