<p>I'm trying to write a Go library to control the size of a terminal application,
allowing for parent processes to draw around a subprocess. Think of constraining Vim to
a specific dimension and still being able to draw around and ontop of the
active vim session.</p>
<p>With that said, i'm struggling to do so. I'm not too familiar with the TTY/PTY,
but more importantly i wonder if i should just be parsing the output stream of
Vim/etc manually. Thus far my attempts to constrain with a pty (via libraries like
<a href="https://godoc.org/github.com/kr/pty" rel="nofollow">kr/pty</a> and
<a href="https://godoc.org/github.com/shavac/gexpect/pty#NewTerminal" rel="nofollow">shavac/gexpect/pty</a>) have been
successful, but drawing (with pre-existing libraries) around them has proven difficult. For example, I'm struggling to constrain the pty to a subregion of the os.Stdout output. It clears the entire window, even though the pty & vim are accurately constrained.</p>
<p>Any direction / thoughts would be appreciated! Ie, do you think i should just parse
the output of programs manually and print it to the shell with my Cell focused terminal?
Or is my pty approach the correct approach?</p>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传